This is a discussion on Escape codes and function keys in keymap. within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hello, I am trying to assing an escape code to a key through a keymap with no luck. I ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, I am trying to assing an escape code to a key through a keymap with no luck. I will provide some kind of example of this thing I am struggling with: The keymap: keycode 0x3b = F50 string F50 = "echo ^[c \n" That would asign a "clear screen" escape code to function key 1 (0x1a in hexadecimal as shown by showkey), but well, it doesn't work. Notice that should be "^[" a literal escape (in Vim, C-v plus Esc). I have tryied also with octal sequences (as said in keymaps manual): keycode 0x3b = F50 string F50 = "echo \033c \n" Being "\033" octal for escape. Again, no luck. The thing about function keys is that I am not able to shift a function key into another one: keycode 0x3c = F1 keycode 0x3b = j That should mean: We press F1 (0x3b) and we get a letter j (works), and we press F2 (0x3c) and we get F1, i.e. letter j (doesn't work). Being curious I have also tried with readline (.inputrc) .inputrc file: "\e[11~": "echo ^[c \n" It doesn't work neither. And those are my thoughts. I would thank any suggestion. Many thanks for your time and attention. Best regards, Marcus. |
| ||||
| Marcus Brody wrote: > Hello, > > I am trying to assing an escape code to a key through a keymap with > no luck. I will provide some kind of example of this thing I am > struggling with: > > The keymap: > keycode 0x3b = F50 > string F50 = "echo ^[c \n" You want "echo -e \"\033[2J\n\"" $ man echo -- Paul Lutus http://www.arachnoid.com |
| Thread Tools | |
| Display Modes | |
|
|