summaryrefslogtreecommitdiffstats
path: root/platform/macos/display_server_macos.h
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-12-11 01:21:22 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-01-23 15:08:12 +0200
commitdaad4aed62bfa471421f960179f0ac0fd78e8040 (patch)
tree86b7f69d180f253c51c4b567139d68850f9e365d /platform/macos/display_server_macos.h
parent9937915ad77059b63582ffd4e324afb26f467b76 (diff)
downloadredot-engine-daad4aed62bfa471421f960179f0ac0fd78e8040.tar.gz
Cleanup and unify keyboard input.
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes. - Unify IME behaviour, add inline composition string display on Windows and X11. - Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events. - Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS. - Add support for media key handling on macOS. Co-authored-by: Raul Santos <raulsntos@gmail.com>
Diffstat (limited to 'platform/macos/display_server_macos.h')
-rw-r--r--platform/macos/display_server_macos.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/macos/display_server_macos.h b/platform/macos/display_server_macos.h
index 4873db4b64..fb9bcdfe56 100644
--- a/platform/macos/display_server_macos.h
+++ b/platform/macos/display_server_macos.h
@@ -69,6 +69,7 @@ public:
bool raw = false;
Key keycode = Key::NONE;
Key physical_keycode = Key::NONE;
+ Key key_label = Key::NONE;
uint32_t unicode = 0;
};
@@ -201,8 +202,6 @@ private:
Point2i _get_native_screen_position(int p_screen) const;
static void _displays_arrangement_changed(CGDirectDisplayID display_id, CGDisplayChangeSummaryFlags flags, void *user_info);
- WindowID _get_focused_window_or_popup() const;
-
static void _dispatch_input_events(const Ref<InputEvent> &p_event);
void _dispatch_input_event(const Ref<InputEvent> &p_event);
void _push_input(const Ref<InputEvent> &p_event);
@@ -229,6 +228,7 @@ public:
void get_key_modifier_state(unsigned int p_macos_state, Ref<InputEventWithModifiers> r_state) const;
void update_mouse_pos(WindowData &p_wd, NSPoint p_location_in_window);
void push_to_key_event_buffer(const KeyEvent &p_event);
+ void pop_last_key_event();
void update_im_text(const Point2i &p_selection, const String &p_text);
void set_last_focused_window(WindowID p_window);
bool mouse_process_popups(bool p_close = false);
@@ -237,6 +237,7 @@ public:
void set_is_resizing(bool p_is_resizing);
bool get_is_resizing() const;
void reparent_check(WindowID p_window);
+ WindowID _get_focused_window_or_popup() const;
void window_update(WindowID p_window);
void window_destroy(WindowID p_window);