Page 1 of 1

How to remap broken (laptop) keyboard?

Posted: Sat 30 Aug 2008, 11:34
by rob
One of the keys on my keyboard oes not work. In windows I was able to remap the ¬`| key to replace the broken letter d on my UK keyboard in the registry quite easily or use the onscreen keyboard. Reading up on the problem in linux, I have found that I must create my own keymap. could some kin user please give an explanation to make my own keymap or uploa one for me please with `¬| key as d? For anyone wondering, seamonkey spell check filled in a few ds for me. Thanks

Posted: Sat 30 Aug 2008, 13:02
by Aitch
Isn't it easier/cheaper to replace the keyboard?

Aitch

Posted: Sat 30 Aug 2008, 15:47
by Flash
Maybe it's a laptop. :)

I'm pretty sure that there are threads in the forum which produced answers that could be adapted to solve this problem. I entered "remap AND keyboard" in the forum search and got 3 results: this thread, plus
http://www.murga-linux.com/puppy/viewto ... 204#208204
http://www.murga-linux.com/puppy/viewto ... 339#165339

Posted: Sun 31 Aug 2008, 02:38
by muggins
What about gtkeyboard?

To use it on pup4, you would probably need to install these files:

glib12-1.2.10.pet (53k)
gtk+12-1.2.10.pet (522k)
gdk_pixbuf10-0.22.0.pet (121k)
imlib-1.9.15-1.pet (386k)

Or what about:

http://www.columbia.edu/~djv/docs/keyremap.html

I'm sure there are other key remap programs, but I can't think of any at the moment. On my laptop, the old trick of using the numeric keypad, and entering Alt+100 doesn't work.

Posted: Sun 31 Aug 2008, 03:08
by muggins
Or xhkeys?

Posted: Sun 31 Aug 2008, 18:48
by rob
Its a laptop :)
I'm trying Xkeycaps as mentioned in one of those previous threads. Thanks

Broken laptop keys

Posted: Thu 04 Sep 2008, 09:51
by tony
Hi rob,

This link was very helpful :-

http://www.columbia.edu/~djv/docs/keyremap.html

I have a dodgy w. So in a terminal typing xmodmap -pke gives the keycodes.

for me keycode 10 is the 1 and exclamation mark

So xmodmap -e "keycode 10 = 1 w" changed the exclamation mark to w

It was only a quick test so picking another key where you could replace both upper and lower case letters by using the shift key would be a better choice.

Once you have got it working put the xmodmap command into /etc/rc.d/rc.local

I don't think this will work for passwords as rc.local is read after the system starts.

Regards Tony

Remap keyboard

Posted: Thu 04 Sep 2008, 22:06
by rob
My main problem is typing the key that isn't working in the rxvt window for testing. I on´t even know how to copy an paste there!

Dodgy keys

Posted: Fri 05 Sep 2008, 07:49
by tony
Hi rob,

my mouse has a left and right button plus a wheel in the middle.

I mark the text with the left button and then click the wheel to paste.

You can copy a letter from anywhere and put it in like this.

You could probably just use the keyboard but you will have to Google to

find out how.

I missed out on the fact that a totally inactive key would cause problems.

I checked out xmodmap on my own computer which is ok.

It's my grandsons computer which is dodgy.

Regards Tony

Posted: Fri 05 Sep 2008, 08:22
by muggins
What's going on Rob? For some reason I thought you had it sorted! Can you give more info on which key you're trying to remap "d" to, as mentioned in your first post in this thread...as I'm none the wiser what key is represented by ¬|

Remapping key

Posted: Fri 05 Sep 2008, 15:08
by rob
The key I'm trying to get mapped to d is the key left of number 1 on my keyboard. I wish to map it to the letter d, as I have it in windows. I was told how to do it, but I can't get a d written in the console window as my d key isn't working! :s What is the paste shortcut for the console window (not ctrl+v, tried that and it didnt work) Sorry guys.

Posted: Sat 06 Sep 2008, 02:28
by muggins
I'm currently on pup2.16, and can paste into a console via Control+v, Shift+insert, and clicking both mouse button simultaneously. I don't know why some of these stopped working for pup4?

But when I'm using pup4, the last, simulating middle mousebutton click, definitely worked.

Posted: Sat 06 Sep 2008, 04:42
by muggins
Rob,

I don't know if there are any gtk frontends to xmodmap anywhere, but I just compiled XKeyCaps, and while it looks a bit dated in it's interface, it does the job.

I just went with the default 101-key keyboard, right-clicked the d key & selected Exchange Keys, then clicked the backtick-tilde keys, then Write Output-> Changed Keys, and it worked straight away.

Because I've compiled it on p2.16, if you were using p4 or p3, you would need to install libxaw95-1.1.4.pet

Also, I think this is only effective during the current Xsession. The above write procedure saved the keymap as /root/.xmodmap-puppypc, so I imagine that this might be overwritten on reboot, so if you saved it as some other name, xxx, then added a line, to /etc/rc.d/rc.local, like:

Code: Select all

xmodmap xxx
then it would be loaded on reboot. Let us know whether this works for you.