Keyboard Keys Broke!


Forum: Apps
Topic: Keyboard Keys Broke!
started by: mi007kes

Posted by mi007kes on Mar. 20 2006,05:58
I have a labtop pentium III, 600mhz, 128 ram...DSL works great, but looking for a way to remap the keys that are out (8, I, K, and comma - are all out) I want to map 8 to F8, I to right ALTkey, K to right CTRL key, and comma to F9. Id even settle for an onscreen keyboard program....if can point me in the right direction, or tell me specifically how to edit linux, to do this, THanks (not an expert FYI)
Posted by mi007kes on Mar. 20 2006,06:42
I halfway answered my own question, i found a DSLextenstion called XkeyCaps...which lets you remap keys. Wrks great but it wants me to add a line of code (like this "xmodmap ~/.xmodmap-`uname -n`") to the approiate startup script, so each time DSL boots, it remaps the keys.....i have no idea what script to add this line of code to. help?>?

P.s. It tells me exactly to do this ----

" Wrote output to the file
/home/dsl/.xmodmap-box

You should modify your login script to contain a line like
 xmodmap ~/.xmodmap-`uname-n`

(those are backquotes.)

Posted by cbagger01 on Mar. 20 2006,06:49
Can't help you with the re-map (someone else here should.  I think it's called xmodmap), but there is an onscreen keyboard in the APPS section of the MyDSL repository:

< http://distro.ibiblio.org/pub.....tar.gz >

Posted by cbagger01 on Mar. 20 2006,06:51
The startup script is called

/opt/bootlocal.sh

and if you are not using a traditional HD install, you will also need to activate the backup/restore process in order to save your files so they will appear after a reboot.

Posted by skaos on Mar. 20 2006,10:55
Maybe you could try to prise off the dead keys and reseat them a few times. Who knows, maybe this will fix the keys.
Posted by spock on Mar. 20 2006,14:20
Hi there,

Xmodmap only works with XFree86 in DSL. I have this line in my /home/dsl/.xinitrc :

xmodmap ~/.Xmodmap-us-ext & (instead of .xmodmap-box)

It enables me to type this by using the CapsLock key on my US keyboard :

¡é«½€×çàßâêîôû¥ø朶äëïöüðå©lùµáéíóúñª¿ÂÊÎÄËÏÁÉÍаÅÛ¢»É¡È÷ÇÀ

Xkeycaps is a great application  :)

Posted by spock on Mar. 20 2006,14:22
For those interested this is my .Xmodmap file :

!
! Extended US keyboard
keycode 66 = Mode_switch Multi_key
keycode 117 = Mode_switch Multi_key
keycode 49 = grave asciitilde twosuperior threesuperior
keycode 10 = 1 exclam exclamdown
keycode 11 = 2 at eacute Eacute
keycode 12 = 3 numbersign guillemotleft guillemotright
keycode 13 = 4 dollar onehalf onequarter
keycode 14 = 5 percent EuroSign cent
keycode 15 = 6 asciicircum dead_acute dead_circumflex
keycode 16 = 7 ampersand egrave Egrave
keycode 17 = 8 asterisk multiply division
keycode 18 = 9 parenleft ccedilla Ccedilla
keycode 19 = 0 parenright agrave Agrave
keycode 20 = minus underscore ssharp macron
keycode 21 = equal plus plusminus notsign
keycode 24 = q Q acircumflex Acircumflex
keycode 25 = w W ecircumflex Ecircumflex
keycode 26 = e E icircumflex Icircumflex
keycode 27 = r R ocircumflex Ocircumflex
keycode 28 = t T ucircumflex Ucircumflex
keycode 29 = y Y yen degree
keycode 30 = u U oslash Ooblique
keycode 31 = i I ae AE
keycode 32 = o O oe OE
keycode 33 = p P paragraph section
keycode 38 = a A adiaeresis Adiaeresis
keycode 39 = s S ediaeresis Ediaeresis
keycode 40 = d D idiaeresis Idiaeresis
keycode 41 = f F odiaeresis Odiaeresis
keycode 42 = g G udiaeresis Udiaeresis
keycode 43 = h H eth ETH
keycode 44 = j J aring Aring
keycode 45 = k K copyright registered
keycode 47 = semicolon colon ugrave Ugrave
keycode 48 = apostrophe quotedbl mu
keycode 52 = z Z aacute Aacute
keycode 53 = x X eacute Eacute
keycode 54 = c C iacute Iacute
keycode 55 = v V oacute Oacute
keycode 56 = b B uacute Uacute
keycode 57 = n N ntilde Ntilde
keycode 58 = m M Multi_key
keycode 59 = comma less thorn THORN
keycode 60 = period greater ordfeminine masculine
keycode 61 = slash question questiondown
keycode 65 = space nobreakspace hyphen

Cheers  :)

Posted by mi007kes on Mar. 22 2006,05:18
Thx for the posts,  i did what said and put this in my .xinitrc

xmodmap ~/.xmodmap-box &

but i still cant get the remapped keys to start up when i boot. is this a format problem, or am i missing something. i am using a harddrive install

Posted by skaos on Mar. 22 2006,10:44
Quote
Xmodmap only works with XFree86 in DSL.

If you're using the Xvesa X-server that comes with DSL it should not work. You either have to install the full XFree mydsl package and configure it, or if you want to use Xvesa, look at how to setup console keyboard as this is what Xvesa uses.

Posted by mikshaw on Mar. 22 2006,15:13
xmodmap works fine with Xvesa.  I use it to set up my windows keys.

mi007kes: Do you have a ~/.xmodmap-box file?  I don't see you mentioning anything about what you put in this file.

Posted by mi007kes on Mar. 22 2006,21:42
Ok here is the deal now....

these commands remap my keys when i enter them into a terminal...

xmodmap -e "keycode 108 = k"
xmodmap -e "keycode 62 = i"
xmodmap -e "keycode 105 = comma"
xmodmap -e "keycode 74 = 8"

now how do i exec these commands when my computer starts....can i put these in
bootlocal.sh , or where is the correct location??

Posted by doobit on Mar. 22 2006,21:55
I think you could put them in /opt/bootlocal.sh right after the keymap configuration entry.
Posted by spock on Mar. 22 2006,22:31
Thanks Mikshaw for the idea. So to be clear an .xmodmap file doesn't work with Xvesa (or at leat I think I tried everything), but the command itself does. I didn't try to put the whole content of the file in .xinitrc...
Posted by mikshaw on Mar. 23 2006,01:39
As far as my experience has been xmodmap works the same in Xvesa as it does in Xfree86, with or without a config file:

xmodmap $HOME/.Xmodmap (or whatever the name of your config file is).

The config file is just a way to do multiple actions without running xmodmap multiple times.
If you have the following lines in ~/.whatever_you_want_to_name_it, you can run it with the command "xmodmap $HOME/.whatever_you_want_to_name_it":
keycode 108 = k
keycode 62 = i
keycode 105 = comma
keycode 74 = 8

Doobit: xmodmap won't work from bootlocal.  It's an X program that adjusts your keymap only for the current X session.  If you want the commands done automatically they should be in .xinitrc, prior to starting the window manager.

Posted by spock on Mar. 23 2006,02:25
Well this is strange. When I was trying to get the French keyboard working in a previous version of DSL I really tried everything, including the xmodmap command in .xserverrc like advised in this old post :

< http://damnsmalllinux.org/cgi-bin....06;st=0 >

After testing and googling wild I came to the conclusion that xmodmap had been removed from Xvesa in DSL for size reasons. Also the xmodmap command for the German keyboard in .xinitrc doesn't seem to change anything on my keyboard in any of the KDrive X server (I tried with a German keymap...)

Anyway I can do with XFree. I guess mi007kes is happy, so are we !

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.