Is there any way of getting the arrow keys to act differently while the control key is pressed. On my system ^-Up and Up generate the same code...
feedback
|
|
From my /etc/personal-linux-console.map:
From my /etc/rc.local:
I just chose these values arbitrarily. Now in the Linux console, Control-Up will send the five characters Escape-<-C-u->, and so on. You tell readline how you want to interpret that in your ~/.inputrc file. With X, there are various places to tweak things. Some changes you can do with I don't know whether it's possible to do Control-keys with xmodmaps commands. I think it is. I used to have mine in custom XKB files (I needed the XKB files anyway, for some stuff.) Now I have the control keys configured in my X terminal (urxvt)'s config files. I use the same arbitrarily chosen sequence escape-<-C-u-> for control-up, and so on, so that I can use the settings in my .inputrc file (for readline) and for other terminal programs (mutt, elinks, and so on). For some key redefinitions, it's also useful to write your own terminfo files so that terminfo-aware applications will be more likely to be able to handle/recognize them. I don't do that for my Control-arrow settings though. But for instance, if you have some key defined to output the string Escape-<-S-U->, you may want to use a terminfo file that declares that string as being the "Undo" key. Then in some applications you'll be able to just refer to that key as "Undo", no matter what it says on your physical keyboard. It's complex. There's no general solution that's simpler. (Though if you were only concerned with a few keys, in a few applications, you may well be able to ignore some of the complexity.) | ||||
feedback
|
|
Under the console, you can use dumpkeys to inspect the translation table and loadkeys to alter it (for instance, here to map them to additional function keys F13-F16):
| |||||
feedback
|
|
Put putty in xterm emulation mode if it can do that, instead of VT100. If it cannot do xterm emulation, switch to an emulator that can. VT100 cannot do the key sequences you want, period. | |||
|
feedback
|