macOS: Fix alt+arrow keys not working when disabling the macos_option_as_alt config option.

This commit is contained in:
Kovid Goyal 2018-01-21 15:41:56 +05:30
parent 46d9dfb614
commit 63317f9c78
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 1 deletions

View File

@ -28,6 +28,9 @@ version 0.7.0 [future]
- macOS: Fix closing top-level window does not transfer focus to other
top-level windows.
- macOS: Fix alt+arrow keys not working when disabling the macos_option_as_alt
config option.
- kitty icat: Workaround for bug in ImageMagick that would cause some images
to fail to display at certain sizes.

View File

@ -176,7 +176,9 @@ on_key_input(int key, int scancode, int action, int mods) {
screen_history_scroll(screen, SCROLL_FULL, false); // scroll back to bottom
}
#ifdef __APPLE__
if (!OPT(macos_option_as_alt) && IS_ALT_MODS(mods)) return;
if (!OPT(macos_option_as_alt) && IS_ALT_MODS(mods) && !(
key == GLFW_KEY_UP || key == GLFW_KEY_DOWN || key == GLFW_KEY_LEFT || key == GLFW_KEY_RIGHT) // alt+arrow keys do not generate text on macOS
) return;
#endif
if (
action == GLFW_PRESS ||