Author Topic: New Keymap For C1k  (Read 4101 times)

jh

  • Full Member
  • ***
  • Posts: 115
    • View Profile
    • http://
New Keymap For C1k
« on: June 02, 2005, 06:17:59 pm »
Hi,

With some help from the #oe folks a little while ago I've been tweaking the keymap for my C1000 running OZ/Opie 3.5.3.  My modifications are:

 * Enable right shift key
 * Remap the two japanese keys near the bottom left of the keyboard: the left one is mapped to tilde and the right one is mapped to / (slash).  I found this to be helpful when typing directories.
 * 'Home' key mapped to F12 so it works in Opie
 * Scroll switch on the side (used in portrait mode) is mapped to up and down and the "Ok" key  is mapped to 'Return' and the "Cancel" key is mapped to Escape

Unfortunately I still haven't gotten the on/off button to work... I tried mapping it to F34 which seems to be the 'Power' key in qte, but that didn't work.  In the meantime I've mapped the 'mail' key in the Buttons applet to the suspend call which works just fine.

I've attached my 'full-keys' output.  In order to install the keymap you need to have the console-utils ipk installed.  In order to install that ipk you'll have to enable force-overwrite since it includes a couple binaries that will replace the busybox version (chvt is one, can't remember the others).  You can always relink those binaries to busybox if you have problems.

And finally, I modified my /etc/init.d/bootmisc.sh and added a call to loadkeys which loads up the keymap before opie is started (anytime you change the keymap you must restart opie).  That addition:
Code: [Select]
if test -e /home/root/full-keys    
then                                
    /usr/bin/loadkeys /home/root/full-keys
fi                                                                

Someday I'll generate a config that can be used as a patch to the kernel, I just haven't quite gotten there yet.

Hope this is helpful for folks...

jason

jamesm

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://
New Keymap For C1k
« Reply #1 on: June 03, 2005, 04:52:26 am »
Am I right to assume that this could be applied to the C3000 eventually as well?
Victim of c3000 ebay scam.... Now after c3100

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
New Keymap For C1k
« Reply #2 on: June 03, 2005, 09:52:10 am »
How about adding mapping to switch between VTs?
-albertr

jh

  • Full Member
  • ***
  • Posts: 115
    • View Profile
    • http://
New Keymap For C1k
« Reply #3 on: June 03, 2005, 10:14:45 am »
Quote
Am I right to assume that this could be applied to the C3000 eventually as well?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=82594\"][{POST_SNAPBACK}][/a][/div]
Yep -- I believe this works for the C3k as well.

Quote
How about adding mapping to switch between VTs?
-albertr
[div align=\"right\"][a href=\"index.php?act=findpost&pid=82632\"][{POST_SNAPBACK}][/a][/div]

I'll look into that this weekend.  

jason

papercrane

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • http://reversefold.com
New Keymap For C1k
« Reply #4 on: July 14, 2005, 02:39:19 pm »
It does indeed work for the C3K as well. I also altered it a bit to map some keys for the RE-CH2 remote so that it could cotrol xmms-embedded. That was ok, but it only works when xmms is in focus. I'm working on getting lineakd working now so that I can control mpd with the remote. :-)

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
New Keymap For C1k
« Reply #5 on: July 20, 2005, 02:59:34 pm »
Hey guys, Zecke instructed me to tell you

"The keymap is an ordinary text file, every user can edit it to achieve the results one want. Each line is for a specified key and each column stands for modifiers. To increment and decrement the VT use Decr_Console or Incr_Console. Qt/E should honor these keys. Console_N where N is range(1..13) you can jump to a given console."

Btw., it would be cool if you would add those patches into the OZ bugtracker (bugs.openembedded.org => distro openzaurus). That way improvements made here could make it into further releases. Otherwise, it's likely that they go lost since we don't have enough people to scan all communication channels out there.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

jh

  • Full Member
  • ***
  • Posts: 115
    • View Profile
    • http://
New Keymap For C1k
« Reply #6 on: July 20, 2005, 05:04:24 pm »
Cool, thanks... I wasn't aware of the Console_N commands.  I'll give them a try.

I keep meaning to create a proper patch for the keys but since it seems to be done in the kernel -keymap.c file I haven't taken the time to get it going.  Hopefully I'll get my bitbake going again this weekend when I migrate to monotone.

jason
« Last Edit: July 20, 2005, 05:04:52 pm by jh »

papercrane

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • http://reversefold.com
New Keymap For C1k
« Reply #7 on: July 20, 2005, 10:47:30 pm »
I used Incr_Console and Decr_Console and it works fine in the console but it's not working in both Opie and GPE. I'm using Fn-9 and Fn-0. Could it perhaps be the Fn keys?

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
New Keymap For C1k
« Reply #8 on: July 20, 2005, 11:55:31 pm »
Hi guys,
I've just added the new keymap to OE.
There was only one change: The "hinge rotated" "key" was mapped to F15 to allow auto-rotate to work.

I'll have a look on how to add a key-combo to switch consoles.

Code: [Select]
-----------------------------------------------------------------
Revision: a6f1ef5bbb3cac8192d0a7bc6d5c64b301e70463
Ancestor: b917e526ef1ed3d2eeb79913937d02f951bc16ff
Author: coredump@openembedded.org
Date: 2005-07-20T20:47:05
Branch: org.openembedded.dev

Added files:
        packages/initscripts/initscripts-1.0/akita/keymap
        packages/initscripts/initscripts-1.0/akitakeymap.map
Modified files:
        .mt-attrs packages/initscripts/initscripts_1.0.bb

ChangeLog:

Akita: Add a fixed keymap, credits to jh@oesf.org
-----------------------------------------------------------------

Many thanks jh!
Webmaster of hentges.net & Embedded Linux Developer.

jh

  • Full Member
  • ***
  • Posts: 115
    • View Profile
    • http://
New Keymap For C1k
« Reply #9 on: July 21, 2005, 12:15:25 pm »
Cool, thanks!  Great to see you've got a C1k now :-)

Now I definitely need to switch to monotone and get my images building again.

jason
« Last Edit: July 21, 2005, 12:15:43 pm by jh »

_sir_maniac

  • Newbie
  • *
  • Posts: 2
    • View Profile
New Keymap For C1k
« Reply #10 on: August 04, 2005, 03:16:30 pm »
In the version of qkeyboard_qws.cpp I see, the console switching tty keys are set to Qt::Key_unknown...