Author Topic: Key Mapping and Mouse Buttons  (Read 2163 times)

zxerx

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • http://
Key Mapping and Mouse Buttons
« on: April 12, 2004, 09:39:34 am »
I\'ve been reading up on how to set up keymapping at:

http://www.zaurususergroup.com/index.php?n...iewtopic&t=1388
http://www.zaurususergroup.com/index.php?n...viewtopic&t=675
http://www.zaurususergroup.com/index.php?n...viewtopic&t=554

which has mostly been extremely helpful.

My xmodmap file is set up exactly how I want it except for one thing - CAPSLOCK. I can\'t get it working. I\'ve tried:


keycode 73 = Tab Tab Caps_Lock Caps_Lock
add lock = Caps_Lock


but this only works while the Caps key is being held down. Any pointers?

Also, does anyone know where to set up the global xmodmap file? I linked to /etc/X11/xinit/.Xmodmap but this didn\'t work, and I\'ve resorted to calling xmodmap from my .xinitrc script.

Secondly, I\'ve been reading about how you\'ve all been setting up 2nd and 3rd mouse buttons using keyboard modifiers (esp. Foxdie), but no-one has mentioned exactly how they\'ve achieved this. There is some vauge mention about a config file \"xkmc\", and Foxdie even has an example at http://foxdie.timduru.org/zaurus/x11_stuff/xkmc  However, there is no such file in my distribution of pdaXrom 1.0.5.

How do I set up a keyboard modifier to activate the 2nd and third mouse buttons???
[span style=\'font-size:7pt;line-height:100%\']Zaurus SL-C760 :: pdaXrom 1.0.5 :: Toshiba 512Mb SD :: Hagiwara 256Mb 10Mbit/s SD :: PQI 256Mb 40x CF :: Socket Low Power 10Mb/s Ethernet CF :: Seano WiFi CF :: Xircom 56k Modem CF[/span]

jgraves

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://
Key Mapping and Mouse Buttons
« Reply #1 on: April 12, 2004, 11:21:02 am »
zxerx,

I don\'t know the issue with Caps Lock.  Never really needed it.  If I get a chance, I\'ll take a look.

The \"global\" xmodmap file is /etc/X11/kb/corgi.xmodmap

If xmodmap doesn\'t do what you need, then there is another option.  It uses the xkeymouse program.  It was very simple
to build, but I don\'t know of anyone hosting the binary.  Check out their website:
http://xkeymouse.sourceforge.net/
Once you get this program, then you start this program from your /home/root/.xinit:
/usr/local/bin/xkeymouse&

This reads the file /etc/xkmc by default.  Here is what my xkmc file looks like:
-----
# Make the Fn3 & Fn4 work as expected (turn the display brightness up/down
keycode=51, Mod2Mask, Exec, /usr/local/bin/downLight, NoFork, NoAutoRepeat
keycode=52, Mod2Mask, Exec, /usr/local/bin/upLight, NoFork, NoAutoRepeat

# Map the Calendar/Address/Mail to mouse buttions 1,2,3 respectively
keycode=96, none, Exec, xmodmap -e \"pointer = 1 2 3\", NoFork, NoAutoRepeat
keycode=97, none, Exec, xmodmap -e \"pointer = 2 1 3\", NoFork, NoAutoRepeat
keycode=98, none, Exec, xmodmap -e \"pointer = 3 2 1\", NoFork, NoAutoRepeat
----------------------
I don\'t really like using xmonobut, so until I find a better use for the calendar, address and mail buttions, I use them as mouse buttions.

Hope this helps.

-John

PS - I\'ll post another message explaining how I got the brightness buttions to work...

zxerx

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • http://
Key Mapping and Mouse Buttons
« Reply #2 on: April 13, 2004, 07:28:27 am »
Brilliant. Thanks jgraves. I now have a fully functional X environment with my favorite wm (ion), a three button mouse, page up, page down, home, end, function keys and all that (no caps lock yet, but I can live without it).

Now if only I could find a replacement for FreeNoteQT......
[span style=\'font-size:7pt;line-height:100%\']Zaurus SL-C760 :: pdaXrom 1.0.5 :: Toshiba 512Mb SD :: Hagiwara 256Mb 10Mbit/s SD :: PQI 256Mb 40x CF :: Socket Low Power 10Mb/s Ethernet CF :: Seano WiFi CF :: Xircom 56k Modem CF[/span]

Caesium

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • http://
Key Mapping and Mouse Buttons
« Reply #3 on: April 13, 2004, 07:48:43 am »
Did you get PageUp/Down working with xmodmap? Could you paste the relevant section of config by any chance?
SL-C860/pdaXrom 1.1.0rc1
Socket Rev.G Bluetooth, Origo/Senao CF WiFi
1GB Sandisk SD + 1GB CF

zxerx

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • http://
Key Mapping and Mouse Buttons
« Reply #4 on: April 14, 2004, 07:33:17 am »
Quote
Did you get PageUp/Down working with xmodmap? Could you paste the relevant section of config by any chance?

Yup, I used Xmodmap. I have to admit I did have some trouble getting what I wanted. Initially, I mapped page up/down to Function-O and Function-P, but kept ketting strange behaviour in an xterm, where SHIFT-PgUP is the \"normal\" way of doing a page up - I lost capital P and capital O.

So, I changed over to the cursor keys where SHIFT doesn\'t really matter. My xmodmap file for page up/down, home, end now looks like:

! Cursor Keys
keycode 43 = Left Left Home
keycode 44 = Up Up Prior
keycode 45 = Down Down Next
keycode 46 = Right Right End


and Function-Up is page up, Function-Down is page down etc. So, when doing a page up/down in an xterm, you should have to do SHIFT-FUNCTION-Up/Down, however, for some strange reason, you only need to do SHIFT-Up/Down (which is fine by me)
[span style=\'font-size:7pt;line-height:100%\']Zaurus SL-C760 :: pdaXrom 1.0.5 :: Toshiba 512Mb SD :: Hagiwara 256Mb 10Mbit/s SD :: PQI 256Mb 40x CF :: Socket Low Power 10Mb/s Ethernet CF :: Seano WiFi CF :: Xircom 56k Modem CF[/span]

Caesium

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • http://
Key Mapping and Mouse Buttons
« Reply #5 on: April 14, 2004, 05:42:33 pm »
zxerx, that works perfectly

In aterm, I do actually have to do Shift-Function-Up/Dn. If I just do Shift-Up, it scrolls up one line. Function-Up does nothing. So I guess that\'s working fine

Coincidentally, it didn\'t work in xterm at all - just as well I don\'t use it anymore

Thanks la lot!
SL-C860/pdaXrom 1.1.0rc1
Socket Rev.G Bluetooth, Origo/Senao CF WiFi
1GB Sandisk SD + 1GB CF

martint

  • Newbie
  • *
  • Posts: 9
    • View Profile
Key Mapping and Mouse Buttons
« Reply #6 on: April 27, 2004, 06:59:08 am »
I use a C760 with pdaXrom 1.05.  

Under the old (ROX-based) Cacko X11 ROM, I found it easy, not only to modify key mappings, but also to assign shortcut keys to launch apps.  I am really struggling to do the same with pdaXrom (using either Matchbox or xfce4).

I have looked through the archives on this forum, the FAQ on the pdaXrom site and also the Matchbox user manual to no avail.

My main issues are:

1) A combination of Cancel and Address buttons seem to be needed to get Alt functionality.  Address works with Tab to do \"Alt-Tab\" window cycling, while Cancel must be used (as a sequential prefix, rather than in combination) to work as Alt when navigating cmd line, or issuing commands in (micro)emacs and Midnight Commander.  I would love to fuse these functionalities in a single key again.

2) Equally, I would love to be able to set up a simple shortcut key (e.g. Mail) to launch an xterm (or any other app).  I think xkmc set this up on the old Roms.

I would be very grateful for any advice (or just a pointer if I have missed something obvious during my researches so far!).

Thanks in advance,
m

martint

  • Newbie
  • *
  • Posts: 9
    • View Profile
Key Mapping and Mouse Buttons
« Reply #7 on: April 28, 2004, 04:45:38 am »
Quote
I use a C760 with pdaXrom 1.05. 

Under the old (ROX-based) Cacko X11 ROM, I found it easy, not only to modify key mappings, but also to assign shortcut keys to launch apps.  I am really struggling to do the same with pdaXrom (using either Matchbox or xfce4).

I have looked through the archives on this forum, the FAQ on the pdaXrom site and also the Matchbox user manual to no avail.

My main issues are:

1) A combination of Cancel and Address buttons seem to be needed to get Alt functionality.  Address works with Tab to do \"Alt-Tab\" window cycling, while Cancel must be used (as a sequential prefix, rather than in combination) to work as Alt when navigating cmd line, or issuing commands in (micro)emacs and Midnight Commander.  I would love to fuse these functionalities in a single key again.

2) Equally, I would love to be able to set up a simple shortcut key (e.g. Mail) to launch an xterm (or any other app).  I think xkmc set this up on the old Roms.

I would be very grateful for any advice (or just a pointer if I have missed something obvious during my researches so far!).

Thanks in advance,
m
Quote
1) A combination of Cancel and Address buttons seem to be needed to get Alt functionality. Address works with Tab to do \"Alt-Tab\" window cycling, while Cancel must be used (as a sequential prefix, rather than in combination) to work as Alt when navigating cmd line, or issuing commands in (micro)emacs and Midnight Commander. I would love to fuse these functionalities in a single key again. 

After posting this it occured that my problems always occured in console or apps that run in console.  Have installed aterm and this seems to read Alt as I want it to (seemed quicker than fiddling with Xterm setting)...I used the ipk which someone has kindly uploaded and linked from an earlier post on this archive (\"xterm settings ?\" 19.03.2004 - http://www.zaurususergroup.com/index.php?n...ewtopic&t=2659).

Quote
2) Equally, I would love to be able to set up a simple shortcut key (e.g. Mail) to launch an xterm (or any other app). I think xkmc set this up on the old Roms. 

It looks like xkeymouse mentioned above will read xkmc to do this - John says it ways simple to build - was this using the SDK? (I haven\'t got that far yet!)

Thanks,
m

martint

  • Newbie
  • *
  • Posts: 9
    • View Profile
Key Mapping and Mouse Buttons
« Reply #8 on: April 29, 2004, 08:31:25 am »
Sorry for obvious ineptitude in quoting in my last post.

Quote
It looks like xkeymouse mentioned above will read xkmc to do this - John says it ways simple to build - was this using the SDK? (I haven\'t got that far yet!)  

Yep - in case anyone is still as confused as I was, xkeymouse does does provide simple way to set up shortcut keys...didn\'t find it *that* straightforward to build with the SDK though - but thanks to Tutorial and Install Guide on pdaXrom site, I was able to edit the Makefile and get things to work...eventually.

Cheers,
m

zxerx

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • http://
Key Mapping and Mouse Buttons
« Reply #9 on: April 29, 2004, 08:35:32 am »
Quote
It looks like xkeymouse mentioned above will read xkmc to do this - John says it ways simple to build - was this using the SDK? (I haven\'t got that far yet!)

Thanks,
m

martint,

xkeymouse builds under the pdaXrom SDK with no problems. I\'ve attached a binary...
[span style=\'font-size:7pt;line-height:100%\']Zaurus SL-C760 :: pdaXrom 1.0.5 :: Toshiba 512Mb SD :: Hagiwara 256Mb 10Mbit/s SD :: PQI 256Mb 40x CF :: Socket Low Power 10Mb/s Ethernet CF :: Seano WiFi CF :: Xircom 56k Modem CF[/span]