View previous topic :: View next topic |
Author |
Message |
sirlark Guru
Joined: 25 Oct 2004 Posts: 306 Location: Limerick, Ireland
|
Posted: Sun May 17, 2009 11:51 pm Post subject: remapping the 'pause' key to delete |
|
|
Hi,
I've just bought a new laptop, and the keyboard has one annoying physical layout problem. The pause key is right where I'm used to the Delete. Seeing as how I never use Pause for anything (I use CTRL-S/CTRL-Q for flow control) I figured I'd remap it it just delete anyway. I've managed to do this for X, using
Code: | xmodmap -e "keycode 127 = Delete" |
127 was reported by xev.
I'm trying to do something similar but at the level of the console keymap. When pressing pause while showkey is running
Code: | ^[[3~keycode 119 press
keycode 119 release |
I've tried creating a modified version of the us keymap, with the added line
Code: | keycode 119 = Delete |
But this causes very strange keyboard behaviour after pause is pressed, requiring me the enter further keypresses increasingly multiple numbers of times to have the effect of a usual single keypress.
I suspect the '^[[3~' has something to do with it and that showkey isn't reporting the pause key accurately. I know that pause is historically one of the really strange exceptions to standard keyboard protocols, sending multiple scancodes in sequence, so I'm not sure if this is a no-hoper.
Has anyone else tried something similar, or can someone give me some pointers...
Thanks _________________ Adopt an unanswered post today |
|
Back to top |
|
|
Malvineous Apprentice
Joined: 20 Oct 2006 Posts: 281 Location: Brisbane, Australia
|
Posted: Thu May 21, 2009 3:29 am Post subject: |
|
|
When I run showkeys with -s (to list scancodes) it reports these:
0xe1 0x1d 0x45 // press
0xe1 0x9d 0xc5 // release
So as long as they're mapped to keycode 119 then you shouldn't have any problems.
The '^[[3~' is the keycode for Delete (which you can see if you run 'cat' and press the Delete key) so when you say you added the line "keycode 119 = Delete" to the keymap, did you also remove the line associating it with Pause? I'm not sure whether that would make a difference.
At any rate, if you're seeing '^[[3~' then it's correctly producing a Delete key event. I assume of course you really do mean Delete, and not Backspace! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|