Author Topic: Configuring Buttons  (Read 5306 times)

Penguin Man

  • Newbie
  • *
  • Posts: 25
    • View Profile
Configuring Buttons
« on: June 07, 2005, 02:55:31 pm »
Has anyone had any luck configuring the buttons (calendar, contacts, home, menu, mail, etc) on the Zaurus under OZ 3.5.3/GPE?  I've tried playing around with kbdconfig and keylaunch (as well as the button configuration thing in GPE's setup), but haven't had any luck getting them to do anything other than their default actions.

Any hints on things to play with?  Anyone got it working?

Penguin Man

  • Newbie
  • *
  • Posts: 25
    • View Profile
Configuring Buttons
« Reply #1 on: June 07, 2005, 04:09:38 pm »
I just found this (SL-5500 keycodes) and have played with them a bit with xmodmap.  I think I should be able to get the keys doing what I want using xmodmap and the gpe-layout or kbdconfig file (or perhaps .keylaunchrc since keylaunch seems to be running by default).  I'll play with it tonight and post if I figure things out.
« Last Edit: June 07, 2005, 04:11:35 pm by Penguin Man »

Penguin Man

  • Newbie
  • *
  • Posts: 25
    • View Profile
Configuring Buttons
« Reply #2 on: June 07, 2005, 08:54:50 pm »
Okay, here's what I did to get it working:

1) Add the following lines to /etc/X11/Xinit.d/40xmodmap and also to the top of /etc/X11/Xsession.d/90keylaunch (you may only need to add it to keylaunch, but adding it to both definitely works):

Code: [Select]
 xmodmap -e 'keycode 42 = XF86PowerDown'                                      
  xmodmap -e 'keycode 47 = Return'
  xmodmap -e 'keycode 98 = XF86Mail'
  xmodmap -e 'keycode 37 = Menu'
  xmodmap -e 'keycode 48 = XF86Start'
  xmodmap -e 'keycode 96 = XF86Calendar'
  xmodmap -e 'keycode 97 = telephone'

This will remap the buttons on the Zaurus to something that makes more sense than the default mapping.

2) At the bottom of /etc/matchbox/kbdconfig is a section called "Shortcut keys for collie".  I changed it to look like the following, but you can customize it to whatever you want the buttons to do:

Code: [Select]
# Shortcut keys for collie
XF86Calendar=!$gpe-calendar
telephone=!$gpe-contacts
XF86Start=!matchbox-remote -desktop
telephonerecorder=!$gpe-todo
XF86Mail=!$gpe-sketchbook
Escape=close

Edit: It seems (at least on my system, which is running with / on an SD card, which could cause this I suppose) that /etc/matchbox/kbdconfig gets overwritten on reboot.  A perfectly good (probably better in fact) workaround is to copy /etc/matchbox/kbdconfig to ~/.matchbox/kbdconfig and then edit the above lines.

3) Make sure you don't have a .keylaunchrc floating around in your home directory.  I had one and it caused X to crash when I logged in.

That's all so far, if I come up with any other neat little things that make this even better, I'll post them.  I'm delighted with GPE, especially now that it works this way.

Edit: todo key not working right now, finding problem.
Edit2: fixed

Perhaps tomorrow I'll try playing around with /etc/gpe/key-layout and see if I can get the graphical config tool to show the Zaurus buttons in roughly their correct places.
« Last Edit: June 08, 2005, 01:18:49 am by Penguin Man »

darmou

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Configuring Buttons
« Reply #3 on: June 08, 2005, 10:48:06 pm »
On another note, I have been unable to work out on collie what control x and control c are.

Do you have any ideas on that Penguin Man?

Thanks,

darmou

Penguin Man

  • Newbie
  • *
  • Posts: 25
    • View Profile
Configuring Buttons
« Reply #4 on: June 09, 2005, 12:38:01 am »
Quote
On another note, I have been unable to work out on collie what control x and control c are.

Do you have any ideas on that Penguin Man?

Thanks,

darmou
[div align=\"right\"][a href=\"index.php?act=findpost&pid=83478\"][{POST_SNAPBACK}][/a][/div]

By default, it would seem that the calendar button is setup to be the left control key, so pressing that and the C key should work.  However, this starts the calendar.  Similarly, if I do Control-C with xstroke, it brings up the calendar.  Perhaps when I xmodmaped the calendar button to be XF86Calendar, it didn't unxmodmap it from Control_L.

Edit: Doing some exploring, it seems like somehow the calendar key is mapped to both control and XF86Calendar, but it won't act as control.
« Last Edit: June 09, 2005, 12:56:16 am by Penguin Man »

darmou

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Configuring Buttons
« Reply #5 on: June 10, 2005, 07:01:41 am »
Quote
Edit: Doing some exploring, it seems like somehow the calendar key is mapped to both control and XF86Calendar, but it won't act as control.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=83485\"][{POST_SNAPBACK}][/a][/div]

In OZ/opie the control key is mapped to the fn key.  Is there any way of separating out the control key and mapping it to the fn key?

darmou

Penguin Man

  • Newbie
  • *
  • Posts: 25
    • View Profile
Configuring Buttons
« Reply #6 on: June 10, 2005, 01:12:19 pm »
Quote
In OZ/opie the control key is mapped to the fn key.  Is there any way of separating out the control key and mapping it to the fn key?

darmou
[div align=\"right\"][a href=\"index.php?act=findpost&pid=83682\"][{POST_SNAPBACK}][/a][/div]

If someone can figure out the keycode for the function key (which shouldn't be too hard - just need to compile xev for the zaurus) then it should be possible to do that.  If you unmapped the calendar key from control and mapped the function key to control, that may work.  However, you may also run into the problem that Fn-W gets interpreted as Control-W rather than 2 as it should (although I suppose one may be able to map Control-W to 2 as well... not sure if this is possible in xmodmap, but it may be).  This wouldn't be much of a problem if (like me) you don't use the keyboard much but if you rely on the keyboard for input it would be a big problem.

Perhaps I'll play around with it this weekend and see what I find.