Keyboard layout based on scancodes?

 
Thread Tools Search this Thread
Special Forums Hardware Keyboard layout based on scancodes?
# 1  
Old 08-09-2011
Keyboard layout based on scancodes?

I would like to make a new keyboard layout that moves the modifier keys around. The problem is that this needs to be an xkb layout, because I still need to be able to switch to the Qwerty layout and the layout of my native language. Is there a way to write an xkb layout that works on the keycodes instead of the symbols?

That is, instead of this type of entry:
Code:
key <LCTL> { [ Control_L ] };

I would use this type of entry (doesn't work, just an example):
Code:
key keycode37 { [ Control_L ] };

I could then do something like put the Shift key where Alt was and move Alt to where the Windows key was:
Code:
key keycode133 { [ Alt_L ] };

Code:
key keycode64 { [ Shift_L ] };

If not, then could I write an additional symbols file and have X use that one when on the custom layout, and use the regular symbols file in the Qwerty and other layouts?

That would be more of a pain and less portable but I'm willing to try it if it's the only option. I've gone through the different layouts trying to understand just how the meta keys are defined and how to override them, but I can't figure it out. Also, I cannot find it documented anywhere. There exist tons of resources on making new keyboard layouts but nothing addresses the issue of moving the modifier keys around.

Thanks in advance for any help.
# 2  
Old 08-10-2011
# 3  
Old 08-10-2011
Thanks, jgt. The only thing that I get from that is that the answer on how to perform this will be different for USB and PS/2 keyboards. Is that correct? If so, I have no problem limiting the technique to USB keyboards.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problem getting vertical bar with British keyboard layout on US (physical) keyboard

Hi, I've got a bit of a ridiculous problem and wasn't sure where to post it. I need to use the vertical bar for piping in Bash but, as per the title, am using a UK layout on a US (physical) keyboard which doesn't have a key for it in the place I'd expect. I've tried using xbindkeys and Unicode... (7 Replies)
Discussion started by: crunchgargoyle
7 Replies

2. Solaris

Unable to change keyboard layout

Hi to everyone Once again I tried to modify my keyboard , because I am crazy keyborad can not be changed using kbd-s eeprom also I tried to modify /boot/solaris/bootenv.rc but I tried opensolaris and my keyboard works perfectly So my question is Can I transfer settings from... (14 Replies)
Discussion started by: solaris_user
14 Replies

3. Solaris

Unable to change keyboard layout

After Solaris 10 installation I was unable to change keyboard using known commands kbd -s and eeprom keyboard layoit. Also modifinig /boot/solaris/bootenv.rc did not helped. And is possible to replace Solaris keymap with ubuntu keymap because my keyboard work perfectly under Ubuntu and... (7 Replies)
Discussion started by: microbot
7 Replies

4. Linux

Changing default keyboard layout in Linux

Hi I have Fedora linux with XFCE desktop. I want to use Indic lanquage in that. I have installed unicode devnagri fonts. But I am not able to change my default keyboard layout. How can I change default keyboard layout in XFCE or through command line. Thanks NeeleshG (0 Replies)
Discussion started by: neel.gurjar
0 Replies

5. UNIX for Dummies Questions & Answers

Changing Keyboard layout

Hi, How do i go about changing the keyboard layout to the UK layout. currently the @ symbol on the keyboard appears as a " sybol on the monitor. Many Thanks in advance Kam (1 Reply)
Discussion started by: vishnura
1 Replies

6. SuSE

Keyboard Layout

ok, I am having a seriouse problem! I can not wite in my landguidge, I live in sweden but I seem to have an american keyboard layout so I cant write some letters and all the key commands are all messed up. Does anyone know where I can find a swedisch keyboard layout? (3 Replies)
Discussion started by: Kimm
3 Replies
Login or Register to Ask a Question