Mapping Keys in Keypad #3434
Replies: 11 comments 3 replies
-
map KP_End send_text normal,application 1 is all you need. According to your debug log, the text is being sent as expected. I dont currently have a keyboard with a keypad to test but the following works fine for me: kitty --config NONE -o 'map f1 send_text normal,application 1' produces the text 1 when pressing F1 as expected |
Beta Was this translation helpful? Give feedback.
-
That behaves exactly the same. Still nothing on the screen, but if I do the ctrl-v thing it still gives ^[[Z regardless.
…________________________________
From: Kovid Goyal ***@***.***>
Sent: Thursday, April 1, 2021 1:05 PM
To: kovidgoyal/kitty ***@***.***>
Cc: BradleySmall ***@***.***>; Author ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
map KP_End send_text normal,application 1
map KP_1 send_text normal,application 1
is all you need. According to your debug log, the text is being sent as expected. I dont currently have a keyboard with a keypad to test but the following works fine for me:
kitty --config NONE -o 'map f1 send_text normal,application 1'
produces the text 1 when pressing F1 as expected
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3434 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAOK3QQL6EECQUCWJ7KNNUTTGSRV7ANCNFSM42HMAYKQ>.
|
Beta Was this translation helpful? Give feedback.
-
dont do ctrl-v run showkey -a or cat |
Beta Was this translation helpful? Give feedback.
-
^[[Z 27 0033 0x1b
91 0133 0x5b
90 0132 0x5a
…________________________________
From: Kovid Goyal ***@***.***>
Sent: Thursday, April 1, 2021 1:13 PM
To: kovidgoyal/kitty ***@***.***>
Cc: BradleySmall ***@***.***>; Author ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
dont do ctrl-v run showkey -a or cat
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3434 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAOK3QTI6WACXH3X4WJJ5IDTGSSSNANCNFSM42HMAYKQ>.
|
Beta Was this translation helpful? Give feedback.
-
Sorry I am out of ideas, according to your debug log, things are working correctly. Either you dont have the map command you think you do, or you have gremlins in your computer. |
Beta Was this translation helpful? Give feedback.
-
The same map commands work for every other key, just not the keypad stuff.
…________________________________
From: Kovid Goyal ***@***.***>
Sent: Thursday, April 1, 2021 1:20 PM
To: kovidgoyal/kitty ***@***.***>
Cc: BradleySmall ***@***.***>; Author ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
Sorry I am out of ideas, according to your debug log, things are working correctly. Either you dont have the map command you think you do, or you have gremlins in your computer.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3434 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAOK3QXUS5TZ4CRPSZFMAIDTGSTNZANCNFSM42HMAYKQ>.
|
Beta Was this translation helpful? Give feedback.
-
I just installed it locally on my home machine and copied the kitty.config and it is behaving the exact same way here. The one at work is actually running on Oracle VirtualBox, so I tried it locally to see if that had anything to do with it.
Version says :
kitty 0.13.3 created by Kovid Goyal
If that helps.
Regards,
Bradley
…________________________________
From: Kovid Goyal ***@***.***>
Sent: Thursday, April 1, 2021 1:20 PM
To: kovidgoyal/kitty ***@***.***>
Cc: BradleySmall ***@***.***>; Author ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
Sorry I am out of ideas, according to your debug log, things are working correctly. Either you dont have the map command you think you do, or you have gremlins in your computer.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3434 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAOK3QXUS5TZ4CRPSZFMAIDTGSTNZANCNFSM42HMAYKQ>.
|
Beta Was this translation helpful? Give feedback.
-
Okay, I think I see the problem. If I don't remap anything many of the keys workout. But once I remap Home, End, Up, Down, Right, Left, Page_Up, Page_Down then the corresponding keys on the number pad stop behaving properly.
As a matter of fact, if I define KP_End then KP_1 stops behaving.
#######
term utc5100
# the next line will break the keypad from sending a 1 when Numlock is in place
map End send_text all \x1b[Z
# the next line will break the keypad from sending a 1 when Numlock is in place
map KP_End send_text all \x1b[Z
#this shouldn't be necessary, but won't fix it after either or both
#of the two previous lines above
map KP_1 send_text all 1
Setting "KP_End" will not affect "End". Setting "Kp_1" will not effect "Kp_End" or "End". But setting "Kp_End" will affect "Kp_1" and setting "End" will effect "KP_1" an "KP_End".
In theory, I shouldn't have to set KP_0 - KP_9 (They send the correct things to the terminal already). However, once I set any of the values on the KP_Keys such as either End or KP_End, or Left or KP_Left those corresponding KP_<numbers> stop working in favor of these underlying Function or KP_Function value.
Hopefully this should be enough to help. Let me know if I can poke at it some more.
Regards,
Bradley
…________________________________
From: Bradley Small ***@***.***>
Sent: Thursday, April 1, 2021 1:52 PM
To: kovidgoyal/kitty ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
I just installed it locally on my home machine and copied the kitty.config and it is behaving the exact same way here. The one at work is actually running on Oracle VirtualBox, so I tried it locally to see if that had anything to do with it.
Version says :
kitty 0.13.3 created by Kovid Goyal
If that helps.
Regards,
Bradley
________________________________
From: Kovid Goyal ***@***.***>
Sent: Thursday, April 1, 2021 1:20 PM
To: kovidgoyal/kitty ***@***.***>
Cc: BradleySmall ***@***.***>; Author ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
Sorry I am out of ideas, according to your debug log, things are working correctly. Either you dont have the map command you think you do, or you have gremlins in your computer.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3434 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAOK3QXUS5TZ4CRPSZFMAIDTGSTNZANCNFSM42HMAYKQ>.
|
Beta Was this translation helpful? Give feedback.
-
Here is the least kitty.conf that would test the issue. One would expect to see 3 different texts, but will always see "KeyBOARD End". Regardless if you hit the 1, or the End on the keyboard or the End on the Keypad.
##
map End send_text all echo KeyBOARD End\n
map KP_1 send_text all echo KeyPAD 1\n
map KP_End send_text all echo KeyPAD End\n
##
…________________________________
From: Bradley Small ***@***.***>
Sent: Thursday, April 1, 2021 3:58 PM
To: kovidgoyal/kitty ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
Okay, I think I see the problem. If I don't remap anything many of the keys workout. But once I remap Home, End, Up, Down, Right, Left, Page_Up, Page_Down then the corresponding keys on the number pad stop behaving properly.
As a matter of fact, if I define KP_End then KP_1 stops behaving.
#######
term utc5100
# the next line will break the keypad from sending a 1 when Numlock is in place
map End send_text all \x1b[Z
# the next line will break the keypad from sending a 1 when Numlock is in place
map KP_End send_text all \x1b[Z
#this shouldn't be necessary, but won't fix it after either or both
#of the two previous lines above
map KP_1 send_text all 1
Setting "KP_End" will not affect "End". Setting "Kp_1" will not effect "Kp_End" or "End". But setting "Kp_End" will affect "Kp_1" and setting "End" will effect "KP_1" an "KP_End".
In theory, I shouldn't have to set KP_0 - KP_9 (They send the correct things to the terminal already). However, once I set any of the values on the KP_Keys such as either End or KP_End, or Left or KP_Left those corresponding KP_<numbers> stop working in favor of these underlying Function or KP_Function value.
Hopefully this should be enough to help. Let me know if I can poke at it some more.
Regards,
Bradley
________________________________
From: Bradley Small ***@***.***>
Sent: Thursday, April 1, 2021 1:52 PM
To: kovidgoyal/kitty ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
I just installed it locally on my home machine and copied the kitty.config and it is behaving the exact same way here. The one at work is actually running on Oracle VirtualBox, so I tried it locally to see if that had anything to do with it.
Version says :
kitty 0.13.3 created by Kovid Goyal
If that helps.
Regards,
Bradley
________________________________
From: Kovid Goyal ***@***.***>
Sent: Thursday, April 1, 2021 1:20 PM
To: kovidgoyal/kitty ***@***.***>
Cc: BradleySmall ***@***.***>; Author ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
Sorry I am out of ideas, according to your debug log, things are working correctly. Either you dont have the map command you think you do, or you have gremlins in your computer.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3434 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAOK3QXUS5TZ4CRPSZFMAIDTGSTNZANCNFSM42HMAYKQ>.
|
Beta Was this translation helpful? Give feedback.
-
Any idea?
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Bradley Small ***@***.***>
Sent: Thursday, April 1, 2021 4:08:41 PM
To: kovidgoyal/kitty ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
Here is the least kitty.conf that would test the issue. One would expect to see 3 different texts, but will always see "KeyBOARD End". Regardless if you hit the 1, or the End on the keyboard or the End on the Keypad.
##
map End send_text all echo KeyBOARD End\n
map KP_1 send_text all echo KeyPAD 1\n
map KP_End send_text all echo KeyPAD End\n
##
________________________________
From: Bradley Small ***@***.***>
Sent: Thursday, April 1, 2021 3:58 PM
To: kovidgoyal/kitty ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
Okay, I think I see the problem. If I don't remap anything many of the keys workout. But once I remap Home, End, Up, Down, Right, Left, Page_Up, Page_Down then the corresponding keys on the number pad stop behaving properly.
As a matter of fact, if I define KP_End then KP_1 stops behaving.
#######
term utc5100
# the next line will break the keypad from sending a 1 when Numlock is in place
map End send_text all \x1b[Z
# the next line will break the keypad from sending a 1 when Numlock is in place
map KP_End send_text all \x1b[Z
#this shouldn't be necessary, but won't fix it after either or both
#of the two previous lines above
map KP_1 send_text all 1
Setting "KP_End" will not affect "End". Setting "Kp_1" will not effect "Kp_End" or "End". But setting "Kp_End" will affect "Kp_1" and setting "End" will effect "KP_1" an "KP_End".
In theory, I shouldn't have to set KP_0 - KP_9 (They send the correct things to the terminal already). However, once I set any of the values on the KP_Keys such as either End or KP_End, or Left or KP_Left those corresponding KP_<numbers> stop working in favor of these underlying Function or KP_Function value.
Hopefully this should be enough to help. Let me know if I can poke at it some more.
Regards,
Bradley
________________________________
From: Bradley Small ***@***.***>
Sent: Thursday, April 1, 2021 1:52 PM
To: kovidgoyal/kitty ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
I just installed it locally on my home machine and copied the kitty.config and it is behaving the exact same way here. The one at work is actually running on Oracle VirtualBox, so I tried it locally to see if that had anything to do with it.
Version says :
kitty 0.13.3 created by Kovid Goyal
If that helps.
Regards,
Bradley
________________________________
From: Kovid Goyal ***@***.***>
Sent: Thursday, April 1, 2021 1:20 PM
To: kovidgoyal/kitty ***@***.***>
Cc: BradleySmall ***@***.***>; Author ***@***.***>
Subject: Re: [kovidgoyal/kitty] Mapping Keys in Keypad (#3434)
Sorry I am out of ideas, according to your debug log, things are working correctly. Either you dont have the map command you think you do, or you have gremlins in your computer.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3434 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAOK3QXUS5TZ4CRPSZFMAIDTGSTNZANCNFSM42HMAYKQ>.
|
Beta Was this translation helpful? Give feedback.
-
I am trying to make the keys so that I can use a terminal based application on a non-standard terminal. The problem comes when I get to the keypad keys.
If I do this:
map KP_1 send_text all 1
map KP_End send_text all 1
When I run kitty in debug-keyboard:
<Press 1 on keypad>
Press scancode: 0x57 clean_sym: KP_End composed_sym: KP_End mods: none glfw_key: 269 (END) xkb_key: 65436 (KP_End)
Keypress matched action: send_text
on_key_input: glfw key: 269 native_code: 0xff9c action: PRESS mods: 0x0 text: '' state: 0 handled as shortcut
Release scancode: 0x57 clean_sym: KP_End mods: none glfw_key: 269 (END) xkb_key: 65436 (KP_End)
on_key_input: glfw key: 269 native_code: 0xff9c action: RELEASE mods: 0x0 text: '' state: 0 ignoring as keyboard mode does not allow release events
Press scancode: 0x4d clean_sym: Num_Lock composed_sym: Num_Lock mods: none glfw_key: 282 (NUM LOCK) xkb_key: 65407 (Num_Lock)
on_key_input: glfw key: 282 native_code: 0xff7f action: PRESS mods: 0x0 text: '' state: 0 sent key to child
Release scancode: 0x4d clean_sym: Num_Lock mods: numlock glfw_key: 282 (NUM LOCK) xkb_key: 65407 (Num_Lock)
on_key_input: glfw key: 282 native_code: 0xff7f action: RELEASE mods: 0x0 text: '' state: 0 ignoring as keyboard mode does not allow release events
<Press 1 on keypad>
Press scancode: 0x57 clean_sym: KP_End composed_sym: KP_1 text: 1 mods: numlock glfw_key: 269 (END) xkb_key: 65436 (KP_End)
Keypress matched action: send_text
on_key_input: glfw key: 269 native_code: 0xff9c action: PRESS mods: 0x0 text: '1' state: 0 handled as shortcut
Release scancode: 0x57 clean_sym: KP_End mods: numlock glfw_key: 269 (END) xkb_key: 65436 (KP_End)
on_key_input: glfw key: 269 native_code: 0xff9c action: RELEASE mods: 0x0 text: '' state: 0 ignoring as keyboard mode does not allow release events
However, nothing gets sent to the screen.
If I am on the screen and do Ctrl-V then I get ^[[Z regardless of whether the Numlock is engaged or not.
How do I get this to work?
Beta Was this translation helpful? Give feedback.
All reactions