KeyCode arg, decimal not hex

11 views
Skip to first unread message

John Gabriele

unread,
Jun 23, 2022, 9:11:30 PM6/23/22
to nicee...@googlegroups.com
Hi all,

Regarding the KeyCode command, I see that I can pass a decimal
number arg to it (a keycode) and it will show me what if any command
that is executed by that keycode. For example, ^y is DeleteLine (or DL
for short), and the keycode for ^y is 0x19. That is:

    ^k kc <Ret> ^y

displays:

    Key Code: 0x19,  Input Class: COMMAND,  Assigned Command: DL

The numbers in the default.keys file
and in my own ~/.ne/.keys file are all given in hex.

But if I want to pass in 0x19 to KeyCode to see what it's bound to,
I've got to supply it in decimal:

    ^k kc 25 <Ret>

displays:

    Key Code: 0x19,  Input Class: COMMAND,  Assigned Command: DL

(same as previously shown above).

What is the rationale for kc to take a decimal arg instead of hex?
Seems like it would be more useful if I could give it the hex number,
for example, if I'm looking at the default.keys file and I want to see
if I've remapped a keycode. Is there a situation where supplying
it as decimal is more useful or easier to work with?

Thanks!

John Gabriele

unread,
Jun 25, 2022, 9:25:12 AM6/25/22
to niceeditor
Ooof! And, I see that if I actually *try* it, it takes hex (and octal) too. :)
Submitted PR to update doc.
Reply all
Reply to author
Forward
0 new messages