From 97fecd1b69e837a3e3300bb7209ef72131abe599 Mon Sep 17 00:00:00 2001 From: Lightning_A Date: Sat, 24 Apr 2021 14:33:50 -0600 Subject: Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods --- platform/osx/display_server_osx.mm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'platform/osx') diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm index 473ae95036..78bfd7eabe 100644 --- a/platform/osx/display_server_osx.mm +++ b/platform/osx/display_server_osx.mm @@ -66,10 +66,10 @@ static bool ignore_momentum_scroll = false; static void _get_key_modifier_state(unsigned int p_osx_state, Ref r_state) { - r_state->set_shift((p_osx_state & NSEventModifierFlagShift)); - r_state->set_control((p_osx_state & NSEventModifierFlagControl)); - r_state->set_alt((p_osx_state & NSEventModifierFlagOption)); - r_state->set_metakey((p_osx_state & NSEventModifierFlagCommand)); + r_state->set_shift_pressed((p_osx_state & NSEventModifierFlagShift)); + r_state->set_ctrl_pressed((p_osx_state & NSEventModifierFlagControl)); + r_state->set_alt_pressed((p_osx_state & NSEventModifierFlagOption)); + r_state->set_meta_pressed((p_osx_state & NSEventModifierFlagCommand)); } static Vector2i _get_mouse_pos(DisplayServerOSX::WindowData &p_wd, NSPoint p_locationInWindow) { @@ -1133,10 +1133,10 @@ static int translateKey(unsigned int key) { /* 38 */ KEY_SHIFT, /* 39 */ KEY_CAPSLOCK, /* 3a */ KEY_ALT, - /* 3b */ KEY_CONTROL, + /* 3b */ KEY_CTRL, /* 3c */ KEY_SHIFT, /* 3d */ KEY_ALT, - /* 3e */ KEY_CONTROL, + /* 3e */ KEY_CTRL, /* 3f */ KEY_UNKNOWN, /* Function */ /* 40 */ KEY_UNKNOWN, /* F17 */ /* 41 */ KEY_KP_PERIOD, -- cgit v1.2.3