How to remap broken key? (SOLVED)

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
redquine
Posts: 40
Joined: Sat Jun 13, 2020 12:38 pm
Has thanked: 123 times
Been thanked: 10 times

How to remap broken key? (SOLVED)

Post by redquine »

My old laptop keyboard has decided it no longer likes the letter 'n' and ignores my attempts to type it. I'm using an external keyboard to type this message, but it's a bit awkward having to reach for that every time I want to send a quick email.

I thought I could simply add a keyboard shortcut via the JWM Hotkey function in JWMDesk Manager, remapping a key combo like ALTGR+B for 'n' and ALTGR+SHIFT+B for 'N'. This appears to be accepted, but when I try to use it to type a letter, nothing happens. I tried it in both Geany and Firefox (my default browser).

I tried an internet search but the only options suggested used xmodmap, which I understand has been deprecated. Any ideas?

I'm in FossaPup64 on a Toshiba Satellite P200 with a UK keyboard.

Last edited by redquine on Thu Feb 18, 2021 6:55 pm, edited 1 time in total.
User avatar
bigpup
Moderator
Posts: 6983
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 903 times
Been thanked: 1522 times

Re: How to remap broken key?

Post by bigpup »

If the key is not working at all and the other keys do work.

This does not hurt anything to try it.

This is one thing you can try.
Remove the key cover.
See if anything is under it that could be blocking actually activating the key switch, that gets pressed down, when you press the key.

Do A Google search for replacing or fixing a key on a Toshiba Satellite P200.
Plenty of videos on how to remove and install a key.

If nothing there that could block movement of key.

Try gently twisting or rocking the actual switch that is sticking up.
The idea is to move it around, so the actual contacts, it is pressing against, are being rubbed on.
this may clean the contacts and make them now work.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
MochiMoppel
Posts: 1231
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 436 times

Re: How to remap broken key?

Post by MochiMoppel »

redquine wrote: Tue Feb 16, 2021 11:23 pm

I tried an internet search but the only options suggested used xmodmap, which I understand has been deprecated. Any ideas?

Are you saying that you didn't even try once, only because someone told you that it is deprecated? Who cares as long as it works? And it should work.

Same with JWM. Should also work if you assign shortcut key-combo to a command like xdotool type n.

Something that always works in any application and needs no setup: Type as usual and ignore the missing 'n', then copy the missing character from somewhere else and paste as needed.

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: How to remap broken key?

Post by williams2 »

You could remap N to F1 by typing this in a text terminal (console):

Code: Select all

xmodmap -e 'keycode 67=n N'

You can pick any convenient key rather than F1.

This will list the default keymap:
xmodmap -pke

You could put the command in a shell script.
You could put the shell script in /root/Startup if you want it to run everytime Puppy boots.

redquine
Posts: 40
Joined: Sat Jun 13, 2020 12:38 pm
Has thanked: 123 times
Been thanked: 10 times

Re: How to remap broken key?

Post by redquine »

williams2 wrote: Wed Feb 17, 2021 4:29 am

You could remap N to F1 by typing this in a text terminal (console):

Code: Select all

xmodmap -e 'keycode 67=n N'

Thanks, that worked! I'd tried xmodmap without success & thought it was because it was deprecated, but it looks as if I just got the syntax wrong. Oops. :oops:

That should keep me going till the weekend when I'll have a chance to try fiddling around with the keys.

Post Reply

Return to “Users”