Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions core/input/input_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ static const _BuiltinActionDisplayName _builtin_action_display_names[] = {
{ "ui_unicode_start", TTRC("Start Unicode Character Input") },
{ "ui_colorpicker_delete_preset", TTRC("ColorPicker: Delete Preset") },
{ "ui_accessibility_drag_and_drop", TTRC("Accessibility: Keyboard Drag and Drop") },
{ "ui_emoji_and_symbols", TTRC("Emoji & Symbols") },
{ "", ""}
/* clang-format on */
};
Expand Down Expand Up @@ -542,6 +543,17 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs.push_back(InputEventKey::create_reference(Key::INSERT | KeyModifierMask::CMD_OR_CTRL));
default_builtin_cache.insert("ui_copy", inputs);

inputs = List<Ref<InputEvent>>();
default_builtin_cache.insert("ui_emoji_and_symbols", inputs);

inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(Key::SPACE | KeyModifierMask::META | KeyModifierMask::CTRL));
default_builtin_cache.insert("ui_emoji_and_symbols.macos", inputs);

inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(Key::PERIOD | KeyModifierMask::META));
default_builtin_cache.insert("ui_emoji_and_symbols.windows", inputs);
Comment on lines +553 to +555

@Calinou Calinou May 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shortcut is also defined by default on Linux when using KDE (Meta + .). Should we also define it there?

I've tried this on KDE 6.6.4 but regardless of whether I define this shortcut, pressing it opens the system emoji picker which doesn't integrate with Godot.


inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(Key::M | KeyModifierMask::CTRL));
default_builtin_cache.insert("ui_focus_mode", inputs);
Expand Down
10 changes: 10 additions & 0 deletions doc/classes/ProjectSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,16 @@
Default [InputEventAction] to move down in the UI.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_emoji_and_symbols" type="Dictionary" setter="" getter="">
Default [InputEventAction] to open the emoji and symbol picker menu.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_emoji_and_symbols.macos" type="Dictionary" setter="" getter="">
macOS specific override for the shortcut to open the emoji and symbol picker menu.
</member>
<member name="input/ui_emoji_and_symbols.windows" type="Dictionary" setter="" getter="">
Windows specific override for the shortcut to open the emoji and symbol picker menu.
</member>
<member name="input/ui_end" type="Dictionary" setter="" getter="">
Default [InputEventAction] to go to the end position of a [Control] (e.g. last item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_END] on typical desktop UI systems.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Expand Down
2 changes: 1 addition & 1 deletion editor/script/script_editor_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ TextEditorBase::EditMenus::EditMenus() {
void TextEditorBase::_make_context_menu(bool p_selection, bool p_foldable, const Vector2 &p_position, bool p_show) {
context_menu->clear();
if (DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_EMOJI_AND_SYMBOL_PICKER)) {
context_menu->add_item(TTRC("Emoji & Symbols"), EDIT_EMOJI_AND_SYMBOL);
context_menu->add_shortcut(ED_GET_SHORTCUT("ui_emoji_and_symbols"), EDIT_EMOJI_AND_SYMBOL);
context_menu->add_separator();
}
context_menu->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
Expand Down
2 changes: 1 addition & 1 deletion editor/shader/text_shader_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2109,7 +2109,7 @@ void TextShaderEditor::_shader_preview_item_pressed(int p_idx) {
void TextShaderEditor::_make_context_menu(bool p_selection, Vector2 p_position) {
context_menu->clear();
if (DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_EMOJI_AND_SYMBOL_PICKER)) {
context_menu->add_item(TTRC("Emoji & Symbols"), EDIT_EMOJI_AND_SYMBOL);
context_menu->add_shortcut(ED_GET_SHORTCUT("ui_emoji_and_symbols"), EDIT_EMOJI_AND_SYMBOL);
context_menu->add_separator();
}
if (p_selection) {
Expand Down
8 changes: 7 additions & 1 deletion scene/gui/line_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,12 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
}

if (is_shortcut_keys_enabled()) {
if (p_event->is_action("ui_emoji_and_symbols", true)) {
show_emoji_and_symbol_picker();
accept_event();
return;
}

if (p_event->is_action("ui_copy", true)) {
copy_text();
accept_event();
Expand Down Expand Up @@ -3303,7 +3309,7 @@ void LineEdit::_update_context_menu() {
}

if (DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_EMOJI_AND_SYMBOL_PICKER)) {
MENU_ITEM_DISABLED(menu, MENU_EMOJI_AND_SYMBOL, !editable || !emoji_menu_enabled)
MENU_ITEM_ACTION_DISABLED(menu, MENU_EMOJI_AND_SYMBOL, "ui_emoji_and_symbols", !editable || !emoji_menu_enabled)
}
MENU_ITEM_ACTION_DISABLED(menu, MENU_CUT, "ui_cut", !editable)
MENU_ITEM_ACTION(menu, MENU_COPY, "ui_copy")
Expand Down
7 changes: 6 additions & 1 deletion scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2722,6 +2722,11 @@ void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
accept_event();
return;
}
if (k->is_action("ui_emoji_and_symbols", true)) {
show_emoji_and_symbol_picker();
accept_event();
return;
}
if (k->is_action("ui_copy", true)) {
copy();
accept_event();
Expand Down Expand Up @@ -8149,7 +8154,7 @@ void TextEdit::_update_context_menu() {
}

if (DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_EMOJI_AND_SYMBOL_PICKER)) {
MENU_ITEM_DISABLED(menu, MENU_EMOJI_AND_SYMBOL, !editable || !emoji_menu_enabled)
MENU_ITEM_ACTION_DISABLED(menu, MENU_EMOJI_AND_SYMBOL, "ui_emoji_and_symbols", !editable || !emoji_menu_enabled);
}
MENU_ITEM_ACTION_DISABLED(menu, MENU_CUT, "ui_cut", !editable)
MENU_ITEM_ACTION(menu, MENU_COPY, "ui_copy")
Expand Down
Loading