i am a bit desperate here, and sort of disenchanted about the possibilities of defining keyboard layouts in linux (ubuntu 10.04 here). there does not seem to be any easy, graphical way to define keyboard mappings (except for keyboardlayouteditor, but frankly, i do not understand the installation description. install antlr? cairo? pango? gobject?? generate grammars?? wtf???).
i am using an apple aluminum keyboard with a german layout, but no matter what i do the (<>) and (^°) keys are always swapped (i did manage to change the default behavior for the f1...f12 keys from multimedia back to 'ordinary', application-centric... all you have to do is add the line
echo 2 > /sys/module/hid_apple/parameters/fnmode to
/etc/rc.local... this is so bloody obvious i am ashamed i had to search the web for this!).
adding to my distress, i find the chinese IMEs a horror (not a single one of the many i tried does anywhere come near google pinyin for windows), and have gotten neither ibus nor scime to work in a satisfactory way for me.
so my idea is as follows:
- find a place in the system where keystrokes are recorded;
- read out those codes (could be scan codes or character codes) using a daemon (implemented in python; i heard you have to listen to IOCTL or somesuch);
- when certain code combinations appear, switch them to do what you want;
- applications now get to see a X where formerly the got to see a U and vice versa;
so, questions are:
- Is there a place, in ubuntu / linux systems that does allow reading out keyboard codes?
- Is there a way to block processing of such keyboard actions until an intercepting daemon has processed them?
- Could i actually mess with such codes?
- Would such an interceptor work for a broad range of use cases? like on the command line, in a gtk app, in wine, in firefox and so on?
- An alternative would actually be to grok keyboardlayouteditor, so if someone could post about a readable, complete installation instruction or point out installable packages, that'd be great, too. or any kind of usable software.