Help - Search - Members - Calendar
Full Version: Lots Of Keymapping Questions
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
Meanie
So now that I got pdaXrom to look good, I am trying to improve its usability to exploring all the existing keyboard shortcuts and possible improvements to make life easier for me.

So far I have discovered the following:

for MatchBox:

* The left Japanese key is mapped to Alt
* Ctrl + Alt + BS = Shutdown X
* Ctrl + Alt + Left/Right = Switch between Virtual Windows
* Address + Tab = Switch between running Applications
* Menu = Activate Launch Menu

for XMMS:
* X = Play
* C = Pause
* V = Stop
* Up = Decrease Volume
* Down = Increase Volume
* Left = Skip Backward
* Right = Skip Forward
* B = Next Song
* Z = Prev Song

Are there any more?

Also, what is the difference between "Shortcut keys" and "SilkScreen" under the Input settings? They seem to refer to the same keys?

I also assigned xmms to the Address in the Shortcut keys, because I am used to have that button launch my music player on Sharp ROM. Now the problem is when I switch app using Address + Tab, xmms also launches. How can I remap the app switching to Menu + Tab?

I also found xbindkeys very helpful for assigning keys to commands which is very nice. However, I am still a bit overwhelmed with all the possible key bindings possible, like using loadkeys and xmodmap. Which of these methods is best for what?

One final thing that is really upsetting me is the configuration of sticky keys. I have found that using accessx would do what I want, but it has this annoying feature of disabling itself after some time. Is there anyway of disabling that feature?
Alternatively, I also found that using loadkeys you can enable the Lock key feature which is better than nothing, but there is also a feature for sticky keys using the SShift and SControl assignment, but I cannot get the latter one to work and it seems to be missing the SFn.

So does anyone who has been using pdaXrom for longer than I have got any ideas on how to tackle this? I like to do everything using the keyboard and leave the stylus inside the Zaurus.

Oh, what is the equivalent of Alt+F4 (exit app)?
pgas
loadkeys is used to set the keys in the console (I'm not sure how this change the keys in X)

xmodmap:
- /etc/x11/kb/akita.xmodmap and user.xmodmap are loaded in .xinitrc

xmodap is used to map keycode to X symbols, like control ,left right or a

shortcuts:
- some shortcuts are defined in X (like shift five times, C-A-bs to kill the Xserver
-some shortcuts are defined in the window manager (in openbox they are defined in the xml files in etc/xdg/openbox/* , this is where you can redifined the shortcuts like Alt-tab, alt f4 etc...), note the default wm is openbox, not matchbox, the desktop and the panel come from matchbox but the shortucts are provided by openbox.

- xbindkeys, allows to define yet other shortcuts

Shortcut keys: the keys adress calendar...of the keyboard
SilkScreen : the little pictogram at the right of the screen (landscape mode) that you can touch


A small example of what I like:
I first defined the little japanese key as Super_L (windows key on a normal keyboard)
by adding in corgi.xmodmap:

keycode 130 = Super_L
then declare it as a modifier:
add mod4 = Super_L

then I define in my wm some actions for this by adding shortcuts like
Super+k = kill window
Super+left = next app
Super+m maximize (it's by default map to C-A-m)
.....


For sticky keys I'm not sure, perhaps one have to look into the source code as the documentation about these feature is scarce.
(note that if you press shift+key at the same time it disable the sticky feature)

For your address button, you want to move the definition of Adress as Alt in akita.xmodmap, make sure that alt is define on another key, and define the Address button as another symbol XF86Media or something (the list of symbol can be found somehwere in /usr/X11R6/ in a normal linux box, I'll try to fetch one if you need)
then in /etc/xdg/openbox, define a shortcut for XF86Media to xmms


I hope this helps a bit....

Edit: oh and some apps define their own shortcuts, I'm not sure if the xmms shortcuts are predifined in xmms or elsewhere..
scheck.r
Switch between running Applications -> Alt + Tab (really)
Now, by default Alt is mapped to Adress and also to the kanji key next to Ctrl key.
By default Ctrl is mapped to Calendar and also to Ctrl key.
What I do is that I map Ctrl to the Ctrl key using the input setup ie Kanji next to Fn button. (which means in fact remove the mapping to Calendar button)
I map also Alt key to Kanji next to "-" button (which is in fact the kanji key next to Ctrl key and not the one next to "-", the expression used in input setup is confusing because it uses the C-7x0 keyboard) so that now Alt key is only mapped to 1rst kanji.
gromituk
Funny how you don't notice the keys you don't use: the two "little Japanese ones"! Could not the other one be mapped to turn the numbers into function keys? Then you'd only be missing F11 and F12 - maybe it could map O and P to these? (You don't want to use shift, Calendar or Address, as these can be used in addition to modify the function keys.)

This mapping conflicts with the one used by scheck.r!

More unmarked keymaps:

Fn-Q (lower or upper case with shift) for the Scandinavian A-with-a-loop thing!
Fn-O (lower or upper case with shift) for the Danish O-crossed-out thing!
Fn-P for £ (Pound Sterling sign - not # which Americans sometimes call a pound sign)
Fn-A for ae (lower or upper case with shift)
Fn-S for € (Euro symbol)
Fn-M for backtick

That only leaves Fn-Z, Fn-N and Fn-5 unmodified.
scheck.r
Becareful with Input Setup, it still have the bug of rewriting kernel.map so that you lose the right shift key and the period key in console.
see http://www.oesf.org/forums/index.php?showtopic=17050&hl=period ://http://www.oesf.org/forums/index.ph...&hl=period ://http://www.oesf.org/forums/index.ph...&hl=period
scheck.r
Ctrl + q is set by default to Kill window.
Alt + Tab next window
Alt + Shift + Tab previous window

Following pgas suggestions, here is my additions to /etc/xdg/openbox/rc.xml file:
It uses the kanji key close to "-" (which is not mapped yet) in combination with arrow keys for manipulating windows
CODE
<keybind key="Mod4-Right">
   <action name="NextWindow"/>
 </keybind>
<keybind key="Mod4-Left">
   <action name="PreviousWindow"/>
 </keybind>
 <keybind key="Mod4-Up">
   <action name="ToggleMaximizeFull"/>
 </keybind>
<keybind key="Mod4-Down">
   <action name="Iconify"/>
 </keybind>
 <keybind key="Mod4-m">
   <action name="ToggleShowDesktop"/>
 </keybind>

and adding in akita.xmodmap:

CODE
keycode 78 = Super_L
add mod4 = Super_L

I add also to /etc/x11/kb/userdefined.xmodmap (idea taken from someone else usefull for NoteCase)
CODE
keycode 120 = Shift_R Shift_R Insert Insert
danr
Speaking of key mapping, this is perhaps slightly off-topic, but has anyone managed to get all keys working in Nedit? I noticed that page up and down (fn up/down) do not work in Nedit, and are interpreted as up/down. But in memacs, for example, they work correctly. Not sure if it's some sort of problem with lesstif or something.

If I export the display to my PC, the PC keyboard page up/down work correctly. But the oddest thing is that if I then use vncviewer on the Nedit window on the PC, the Zaurus page up/down works! (are you still following this? ;-)

The other slightly odd thing about Nedit is that I can bind ctrl-space as an accelerator to something in the macro menu (preferences/default settings/customize menus/macro menu), but it won't work in the editor itself.

Hmm, strange...

Dan
Meanie
Thanks everyone for your insights. I see things much clearer now and have started to map out the keyboard. Apart from the sticky keys, all is fine now.

I have made a copy of kernel.map and each time X exits, it does a diff with my backup copy and restores it if it differs!
I decided not to use the Lock feature which I could had enabled in kernel.map

I also rewrote the akita.xmodmap file to mirror the Spitz/Borzoi keyboard according to what xev says, so that each key that exist on the keyboard is specifically mapped to avoid any ambiguity. Also removed to duplicate mapping of Alt and Ctrl from the Calendar and Address keys so those keys are free for other assignments.

So the following key combos were mapped but not marked on the keyboard:
Fn-Q (lower or upper case with shift) for the Scandinavian A-with-a-loop thing!
Fn-O (lower or upper case with shift) for the Danish O-crossed-out thing!
Fn-P for £ (Pound Sterling sign - not # which Americans sometimes call a pound sign)
Fn-A for ae (lower or upper case with shift)
Fn-S for € (Euro symbol)
Fn-M for backtick
Right Kanji key is `, same as Fn-M

I switched Fn+M and Fn+Q around smile.gif and left the Alt key be the left kanji key and made the right kanji key the Super_L. How many max modifiers can be defined? The current modmap file clears 5 but only map 2. I also redefined the keys at the back of the Zaurus for use with xmms, ie play, pause, prev, next

Also I am going to use /etc/xdg/openbox/rc.xml for customising shortcuts and extra mappings. Seems like it does the same thing as xbindkeys so might as well uninstall xbindkeys and just use the openbox feature instead. Added a binding for screencap as well. A lot of keycombos are already mapped for openbox. Lots of goodies smile.gif

Now back to the sticky keys I am having problems finding docu that clearly explain the options for AccessX, not just what they do but how to actually configure them... anyone know?
pgas
QUOTE
Now back to the sticky keys I am having problems finding docu that clearly explain the options for AccessX, not just what they do but how to actually configure them... anyone know?


yeah, this is a problem, as I said, reading the source is perhaps the easiest way tongue.gif
Meanie
well, I summarized everything here and did some extra mods
http://www.users.on.net/~hluc/myZaurus/cus...rom.html#keymap
desertrat
QUOTE(Meanie @ Mar 23 2006, 12:46 PM)
well, I summarized everything here and did some extra mods

Thanks, useful stuff.

Whilst we're on the subject, has anyone gotten the silkscreen buttons to work on a 3100? I've asked before but sadly got no answer smile.gif

-- cheers
desertrat
I've been trying to get icewm to recognise the non-standard modifier keys (ie Fn, Super_L) so that I can use them as hotkeys to launch commands, and failed.

So now I'm trying xbindkeys and in using the "-mk" option to determine the keycodes I've discovered something weird: when I press the "Calendar" key on its own I get:
CODE
"NoCommand"
   m:0x4 + c:96
   Control + XF86LaunchA

That is the Calendar key is mapped to both XF86LaunchA and Control. Now in the default pdaxrom/openbox setup the Calendar and Address keys are duplicates of Ctrl and Alt, however I have taken steps to remove these redundant mappings and I only use the Ctrl key for Ctrl and the key to the right of that for Alt. I have attached my /etc/X11/kb/akita.xmodmap file, it's based on Meanie's file along with some contributions from various places in this forum. And here is the contents my kernel.map file:
CODE
keycode 65 = Tab
   alt     keycode 65 = Caps_Lock
   shift   keycode 65 = Caps_Lock
   control keycode 65 = Caps_Lock
keycode 27 = Shift
keycode 89 = Alt
keycode 88 = Control
keycode 112 = Shift

BTW how does the keycode here relate to the keycodes obtained using xev?

Also I am not using openbox so whatever is in /etc/xdg/openbox/rc.xml is irrelevent.

So the question is where is the Calendar key being mapped to Ctrl? Now for the weirder thing, I start mrxvt and open a bunch of tabs, now if I press Calender+d quickly then I just get 'd' displayed in the terminal, but if I press and hold Calendar down for a couple of secs then also press d, I get the equivalent of Ctrl+d which of course closes one of my tabs.
uMP2k
QUOTE(desertrat @ Sep 1 2006, 04:41 AM)
So the question is where is the Calendar key being mapped to Ctrl? Now for the weirder thing, I start mrxvt and open a bunch of tabs, now if I press Calender+d quickly then I just get 'd' displayed in the terminal, but if I press and hold Calendar down for a couple of secs then also press d, I get the equivalent of Ctrl+d which of course closes one of my tabs.
*



This is exactly the question I have been trying to work out. How can I make the Calender, Address, Home, etc keys available to be allocated as shortcuts keys. I have been able to allocate the menu key in xfce4's keyboard shortcut setup, but these other keys are not available as they seem to be wired up to Alt and Control. Anybody know where I can change this?
zi99y
Have you checked /etc/xkmc ? My default setup only had Fn + 1,2,3,4 , and thehinge switch key mappings configured by default but maybe there are some others in yours. Worth a look anyway.

I'm actually trying to fix a mapping problem with the silkscreen patch for the CXX00 series in this thread: http://www.oesf.org/forums/index.php?showt...=0&#entry148438
desertrat
QUOTE(zi99y @ Dec 7 2006, 10:09 PM)
Have you checked /etc/xkmc ?

I don't have this file. What is it for? Could you please attach a copy here?
zi99y
Sure, here is the contents:
CODE
#####
#
# Exec
# keycode, modifier,     Exec,  Command,          Extra parameters
#
#######################################################
#keycode=25,        Control+Shift,  Exec, xterm -fg green2 -bg black -sb -sl 1000 -cr green2, Fork, NoAutoRepeat
#keycode=49,        Control,  Exec, xmodmap -e "pointer = 1 2 3", NoFork, NoAutoRepeat
#keycode=50,        Control,  Exec, xmodmap -e "pointer = 2 1 3", NoFork, NoAutoRepeat
#keycode=51,        Control,  Exec, xmodmap -e "pointer = 3 2 1", NoFork, NoAutoRepeat
keycode=110,        none,     Exec, chkhinge, NoFork, NoAutoRepeat
#keycode=49,         Mode_switch,     Exec, xrandr -s 0, NoFork, NoAutoRepeat
#keycode=50,         Mode_switch,     Exec, xrandr -s 1, NoFork, NoAutoRepeat
#keycode=51,         Mode_switch,     Exec, setfl -, NoFork, NoAutoRepeat
#keycode=52,         Mode_switch,     Exec, setfl +, NoFork, NoAutoRepeat


My edits were to comment out the last four lines. Clearly it's only for key mappings in X11.
Meanie
I finally got accessx (sticky keys) working the way I like, ie the same as in Sharp/Cacko with keyhelper enabled.

you will need to enable accessx in startx script by setting defaultserverargs to " +kb +accessx -screen 480x640@270"

then use the ax utility (which I have compiled and packaged up) with the following options to enable sticky keys:

ax +stickykeys -stickytwokeydisable -timeout
Meanie
I updated spitz.xmodmap as follows:

http://www.users.on.net/~hluc/myZaurus/pdaxii13.html#keymap


this works well with sticky keys and the silkscreen and supports most characters required by german and french words...

the only problem is caps lock which requires hacking Xfbdev and thus caps lock is disabled. the other annoyance is that you cannot use Fn+1,... which I worked around by assiging those to Super+1,... but to fix that Xfbdev needs to be hacked as well just like the caps lock problem...

btw, silkscreen work because of a patch in Xfbdev...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.