Distinguish shifted Pgup and PgDn keys in normal and application mode

Fixes #791
This commit is contained in:
Kovid Goyal 2018-08-05 17:17:15 +05:30
parent 634d262b64
commit 1dc3dfe58f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 10 additions and 8 deletions

16
kitty/keys.h generated
View File

@ -598,9 +598,9 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 59: // UP
return "\x06\x1b\x5b\x31\x3b\x32\x41";
case 60: // PAGE_UP
return "\x04\x1b\x5b\x35\x7e";
return "\x06\x1b\x5b\x35\x3b\x32\x7e";
case 61: // PAGE_DOWN
return "\x04\x1b\x5b\x36\x7e";
return "\x06\x1b\x5b\x36\x3b\x32\x7e";
case 62: // HOME
return "\x06\x1b\x5b\x31\x3b\x32\x48";
case 63: // END
@ -2225,9 +2225,9 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 59: // UP
return "\x06\x1b\x5b\x31\x3b\x32\x41";
case 60: // PAGE_UP
return "\x04\x1b\x5b\x35\x7e";
return "\x06\x1b\x5b\x35\x3b\x32\x7e";
case 61: // PAGE_DOWN
return "\x04\x1b\x5b\x36\x7e";
return "\x06\x1b\x5b\x36\x3b\x32\x7e";
case 62: // HOME
return "\x06\x1b\x5b\x31\x3b\x32\x48";
case 63: // END
@ -3861,9 +3861,9 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 59: // UP
return "\x06\x1b\x5b\x31\x3b\x32\x41";
case 60: // PAGE_UP
return "\x04\x1b\x5b\x35\x7e";
return "\x06\x1b\x5b\x35\x3b\x32\x7e";
case 61: // PAGE_DOWN
return "\x04\x1b\x5b\x36\x7e";
return "\x06\x1b\x5b\x36\x3b\x32\x7e";
case 62: // HOME
return "\x06\x1b\x5b\x31\x3b\x32\x48";
case 63: // END
@ -5488,9 +5488,9 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 59: // UP
return "\x06\x1b\x5b\x31\x3b\x32\x41";
case 60: // PAGE_UP
return "\x04\x1b\x5b\x35\x7e";
return "\x06\x1b\x5b\x35\x3b\x32\x7e";
case 61: // PAGE_DOWN
return "\x04\x1b\x5b\x36\x7e";
return "\x06\x1b\x5b\x36\x3b\x32\x7e";
case 62: // HOME
return "\x06\x1b\x5b\x31\x3b\x32\x48";
case 63: // END

View File

@ -48,6 +48,8 @@ SHIFTED_KEYS = {
defines.GLFW_KEY_RIGHT: key_as_bytes('kRIT'),
defines.GLFW_KEY_UP: key_as_bytes('kri'),
defines.GLFW_KEY_DOWN: key_as_bytes('kind'),
defines.GLFW_KEY_PAGE_UP: modify_complex_key('kpp', 2),
defines.GLFW_KEY_PAGE_DOWN: modify_complex_key('knp', 2),
}
control_alt_codes = {