View Single Post
  #6   (View Single Post)  
Old 22nd April 2013
tehsean tehsean is offline
Custom User
 
Join Date: Aug 2010
Posts: 22
Default

Sorry to bring this back from the grave, but I wanted to thank IdOp for the great response.

I also wanted to add a bit of information that I found that helped me out.

I have successfully changed the Menu key to Shift_R on the Sony Vaio UX with the following:
Code:
wsconsctl keyboard.map+="keysym Menu = Shift_R"
For reference to others, if you are trying to figure out what keycode or keysym a key transmits when pressed, ONE way to find out is in X, with the 'xev' program. It displays X events, including key presses. There may be other ways but this was easy enough for me.

I originally tried to add the keycode manually. In my case, the thumb board transmits a keycode of 117 for the Menu key (reported by xev). This DID NOT WORK:
Code:
wsconsctl keyboard.map+="keycode 117 = Shift_R"
Looking at the keyboard.map, there was no code already assigned for 117, so I'm not sure why it didn't work. My best guess is that the kernel ignores this keycode. I believe the answer may lie in wskeysyms.h .If anyone knows, I'd love to hear your thoughts.

The other thing left is to reassign the Delete key to Control_R. From what I've read, this may be harder due to the way that the terminal handles Delete and BackSpace. So far any mappings I have attempted have only managed to break the backspace key in the console.

For additional reference, if you DO wind up messing up your keylayout, you can clear the configuration pretty quickly by reassigning the keyboard encoding. In my case, this is US:
Code:
wsconsctl keyboard.encoding=us
This reverts the keyboard layout back to stock, removing any += modifiers you may have made in the terminal session you are currently in.
Reply With Quote