Author Topic: key remapping  (Read 4879 times)

alan

  • Full Member
  • ***
  • Posts: 221
    • View Profile
key remapping
« on: May 30, 2004, 04:59:40 pm »
Hi!

Is there an \"easy\" (i.e. \"no vi please\") way to remap the keaboard on pdaxrom in order to have the é/è/à/ and the ^ accent from the french keaboard ?

Thanks

sashz

  • Sr. Member
  • ****
  • Posts: 388
    • View Profile
    • http://
key remapping
« Reply #1 on: May 30, 2004, 11:56:52 pm »
Quote
Hi!

Is there an \"easy\" (i.e. \"no vi please\") way to remap the keaboard on pdaxrom in order to have the é/è/à/ and the ^ accent from the french keaboard ?

Thanks


see /etc/X11/kb/corgi.xmodmap

alan

  • Full Member
  • ***
  • Posts: 221
    • View Profile
key remapping
« Reply #2 on: May 31, 2004, 11:58:28 am »
Thanks for your answer, sashz ! It seems to take quite a long time to set up everything and i am passing my final exams, so i\'ll do that a bit latter.

Yet, i have an idea : what about collecting every keaboard layouts with a description for what has changed from the original one and make them avaliable either on the zug or on pdaxrom.org ?

I will post here mine when i will have done it.

ericwerk

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • http://www.elefantelegante.org
key remapping
« Reply #3 on: June 01, 2004, 07:36:21 am »
I wrote a little script for a custom keymapping for madplay (the command line audio player) on pdaxrom which i hope somebody might find useful. It can be used for any other app as well of course with minimal changes
this is the file:

trap cleanup 1 2 3 6

cleanup()
{
        xmodmap /etc/X11/kb/corgi.xmodmap
}

if [ -z $1 ]
then
        DIR=/mnt/cf # change to your default mp3 directory
else
        DIR=$1
fi

# your own custom keymap here              
xmodmap /home/root/Documents/madplay.xmodmap
                                 
madplay --tty-control ${DIR}/*.mp3
                                 
xmodmap /etc/X11/kb/corgi.xmodmap

####
end of file

My new mappings are:

keycode 134 = minus                        
!keycode 134 = Left                        
keycode 133 = plus                          
!keycode 133 = Right                        
keycode 131 = f                            
!keycode 131 = Return                      
keycode 132 = b                            
!keycode 132 = Escape

now you can use the cancel and ok keys to move through your playlist and use the little grey thingy (on a 860, whatever it is called) to change the volume. If i could find a way to turn the screen off and control suspending within bash i\'d be happy.
<hr>
860, 256 MB PNY CF, 1 GIGA PQY CF, 512MB SANDISK SD, 802.11b CF
Gentoo, MacosX

alan

  • Full Member
  • ***
  • Posts: 221
    • View Profile
key remapping
« Reply #4 on: June 02, 2004, 05:45:07 am »
thanks ericwerk !!!

That is the kind of contribution i had in mind! I hope many others will come.

I have a question : does this mean that you can remap your keyboard for each application independantely from the others? With such a script, will my keaboard be remapped just as long as madplay is running and then it will switch to default when i leave madplay ?

LadyBug

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • http://
key remapping
« Reply #5 on: June 02, 2004, 08:48:07 am »
Yeah, it looks like that. It restores the original keymap (corgi.xmodmap) when madplay exits
or is killed. You could copy that script and run whatever program you want instead of madplay.
C760, Symbol CF WiFi, Lexar 1GB SD, score of CFs
Currently running pdaXrom.

ericwerk

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • http://www.elefantelegante.org
key remapping
« Reply #6 on: June 02, 2004, 08:27:37 pm »
yep, that is indeed the idea. I think it is easier to remap the keys from a script you run instead of having to do it in the code itself (with all that that implies in terms of maintenance for every new version of the original non zaurus app).  It would be nice to have a collection of these scripts and their associated mappings for more apps. Maybe there is a way to do this without the need to copy the whole xmodmap for every app, but I don\'t know it. I\'m still looking for ways to control the screen off and suspend behavior as well. Any tips on that would be greatly appreciated
<hr>
860, 256 MB PNY CF, 1 GIGA PQY CF, 512MB SANDISK SD, 802.11b CF
Gentoo, MacosX

jagrka

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
    • http://
key remapping
« Reply #7 on: June 02, 2004, 09:55:12 pm »
Does anyone know where I can find a complete list of all the key mapping codes and characters for the Sharp ROM Zaurus SL-C760? A program called KeyHelper and its GUI KeyHelperconf allows one to easily map any key, but I need to know the codes for the characters, such as macrons and accents, that can\'t already be generated directly from the keyboard. I suppose it\'s important to note that not all fonts with have these characters. These two programs can be downloaded at the following URLs.

http://yakty.s31.xrea.com/cgi-bin/misc/dl....0.3.0-1_arm.ipk
http://yakty.s31.xrea.com/cgi-bin/misc/dl....1.1.6-1_arm.ipk
Zaurus SL-C760/Sharp ROM 1.40 JP
Linux Kernel 2.4.18-rmk7-pxa3-embedix, Tetsu Special Kernel 14e
Transcend 2GB SD Card (with SD-Link11b driver)
Planex Communications GW-CF11H Wi-Fi CF Card
Kwins for PDA KW-H128C2 PHS Communications CF Card

alan

  • Full Member
  • ***
  • Posts: 221
    • View Profile
key remapping
« Reply #8 on: June 03, 2004, 04:07:29 am »
hi !

I think (not sure...) that xmodmap can indicate the keynumber for each key using the \" -display \" argment.

See http://www.xfree86.org/4.2.0/xmodmap.1.html for infos.

Good luck and bon courage (cheer up !).

wario

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://
key remapping
« Reply #9 on: June 06, 2004, 08:33:36 am »
xev is your friend

wario

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://
key remapping
« Reply #10 on: June 06, 2004, 09:50:44 am »
i find these additions to ~/.config/openbox/rc.xml mandatory:

Code: [Select]


    





    





    





    





    



so i guess this isn\'t a clever script just my confs. whatever.

eviLjazz

  • Full Member
  • ***
  • Posts: 116
    • View Profile
    • http://katastrophos.net/andre/blog
key remapping
« Reply #11 on: June 07, 2004, 12:56:45 am »
I\'ve made a small script that will load custom keymaps for specified applications. You can find it here:
http://www.zaurususergroup.com/index.php?n...iewtopic&t=4727
Sharp Zaurus SL-C3200/36GB running Cacko : Fujitsu LifeBook U2010/64GB SSD running Win7 : Nokia N900 (yes, flame me.) Blog : Twitter : Trac
Quasar Media Player : QScrobbler : Enhanced audio driver and mixer for C1000/C3x00 : Unified Sharp/Tetsu/Cacko/pdaXrom Kernel 2.4.20 branch : My packages : Sources

alan

  • Full Member
  • ***
  • Posts: 221
    • View Profile
key remapping
« Reply #12 on: June 08, 2004, 11:10:19 am »
eviLjazz, that is a great stuff !!!

Now, does anyone know how to get a key as an accent that waits for being completed by a letter ? (quite diffucult to express myself...). I mean i would like the two japaneese keys between Fn and - to be grave and acute accent, but i want then to combine with the next letter in order to get an \"é\" by pressing [japanees_key] and then e for exemple.

I\'ve edited (vi is not that complicated, after all...) my  /etc/X11/kb/corgi.xmodmap with

keycode 129 = dead_acute dead_circumflex
keycode 130 = dead_grave dead_cedila

but it does\'nt work. What have i missed ? Do i have to edit the final lines too ?

Thanks in advance.

alan

  • Full Member
  • ***
  • Posts: 221
    • View Profile
key remapping
« Reply #13 on: June 08, 2004, 03:42:05 pm »
Oki; guys, Zazz is a genius.

He helped me out for this problem and here is the solution : This is the new corgi.xmodmap file to place in  /etc/X11/kb/


 
!
! \'Fn\' key setup for c700
!

clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5

clear lock

!keycode 73 = Tab Tab Caps_Lock

keycode 54 = 6 ampersand ae AE
keycode 55 = 7 apostrophe oslash Ooblique
keycode 56 = 8 parenleft aring Aring

keycode 25 = q Q
keycode 31 = w W asciicircum asciicircum
keycode 13 = e E equal equal
keycode 26 = r R plus plus
keycode 28 = t T bracketleft bracketleft
keycode 33 = y Y bracketright bracketright
keycode 29 = u U braceleft braceleft
keycode 17 = i I braceright braceright
keycode 23 = o O
keycode 24 = p P

keycode 9  = a A
keycode 27 = s S
keycode 12 = d D period period
keycode 14 = f F backslash backslash
keycode 15 = g G semicolon semicolon
keycode 16 = h H colon colon
keycode 18 = j J asterisk asterisk
keycode 19 = k K
keycode 20 = l L bar bar

keycode 34 = z Z
keycode 32 = x X
keycode 11 = c C
keycode 30 = v V
keycode 10 = b B underscore underscore
keycode 22 = n N
keycode 21 = m M

keycode 66 = minus minus at at
keycode 71 = comma slash less less
keycode 72 = period question greater greater

keycode 129 = dead_acute dead_circumflex
keycode 130 = dead_grave dead_cedilla

keycode 38  = Mode_switch

! Mail
keycode 98 = XF86Mail

! Home
keycode 48 = XF86Start

! R-Shift
keycode 111 = Pointer_EnableKeys

! Menu
keycode 37 = Pointer_Button2
!XF86Start

! side buttons

keycode 117 = XF86PowerDown
keycode 134 = Left
keycode 133 = Right
keycode 131 = Return
keycode 132 = Escape

! This is the screen swivel sensor - think of a better keysym !

keycode 110 = Sys_Req

add mod1    = Alt_L Alt_L Alt_L
add mod2    = Mode_switch

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



Note : the modified keys are keycode = 129 & keycode = 130. They are the two japaneese keys that allow to draw accents on any vowel (depending on fonts) or to write the \"ç\" like in \"français\" with \"Shift + [right_japaneese_key]\" and then \"c\".


I think such a xmodmap file can be interresting with or without eviLjazz\'s script as it does\'nt change anything for english usage.

Enjoy!