You are not logged in.

#1 2008-11-22 12:55:04

jorpheus
Member
Registered: 2008-11-07
Posts: 98

nice editor (ne) question

Here's what the manual says about keybinding:

The format of a key binding description is
   
KEY hexcode command

The hexcode value is the ASCII code of the keystroke.

Could someone explain to me what the hell does the last line mean? Hexcode value is the ASCII code of the keystroke?

One of the examples given there:

KEY 101 LineUp

binds to the "cursor-up" key the action of moving the cursor one line up.

I've tried googling it, but since I don't understand what is meant here, no such luck. The values returned by xev when I press the up key do not correspond with 101.

Offline

#2 2008-11-22 17:15:30

Redroar
Member
Registered: 2008-03-17
Posts: 200

Re: nice editor (ne) question

showkey -a

This will show the hex, ascii and octal code of the key pressed. This must be used on a virtual term, and not in X. So just Ctrl+Alt+F1 over and log in, then use showkey. Note, the ONLY way to exit is Ctrl+D in this mode.


Stop looking at my signature. It betrays your nature.

Offline

#3 2008-11-23 00:25:57

jorpheus
Member
Registered: 2008-11-07
Posts: 98

Re: nice editor (ne) question

Thank you for replying. I tried it, and the numbers returned still do not correspond. Is there something this result depends upon?

Offline

#4 2011-01-08 16:30:00

utoddl
Member
Registered: 2011-01-08
Posts: 1

Re: nice editor (ne) question

The easiest way to figure out the keycode you want is to use ne's "keycode" command at the command line. Hit ^k to get the command line, the type "keycode" and press Enter. You'll be prompted to press some key. When you do (say, the CursorUP key), the status bar will change to show the following:

Key Code: 0x101,  Input Class: COMMAND,  Assigned Command: LU

...and you're back to regular editing mode. If you're trying to remap your keys, the "keycode" command is indispensable.

Offline

Board footer

Powered by FluxBB