simple key remapping for broken key

342 views
Skip to first unread message

Ari Meyer

unread,
Nov 22, 2014, 7:53:34 PM11/22/14
to autoke...@googlegroups.com
Hi,

I am just now moving to Linux Mint from Windows, so please forgive my Linux ignorance.  My keyboard's "p" key no longer works.  I would like to remap my <np_home> key ("7" with numlock on) to serve as my "p" key.  With this, I need <shift>+<np_home>, <ctrl>+<np_home>, etc. to map the same way to <shift>+p, <ctrl>+p, etc., with numlock on or off  I did this with AutoHotKey using this script:

Numpad7::
NumpadHome::p
^Numpad7::
^NumpadHome::^p
!Numpad7::
!NumpadHome::!p
!+Numpad7::
!+NumpadHome::!+p
^+Numpad7::
^+NumpadHome::^+p
^!Numpad7::
^!NumpadHome::^!p
^!+Numpad7::
^!+NumpadHome::^!+p

Is there an analogous set of phrases or a script I can write for autokey?  I tried using phrases, but after successfully mapping the hotkey <np_home> to "p", further key combinations starting causing problems.

Thanks,
Ari

Joe

unread,
Nov 23, 2014, 5:04:00 AM11/23/14
to autoke...@googlegroups.com
Welcome to the list Ari.

Except for the keys which are modifier keys to start with, a particular
key can only be mapped once in AutoKey.

So, you can't do it in AutoKey, but:

Linux provides keyboard remapping tools which should allow you to remap
the np_home key to the p key itself.
This will show you how it's done:
http://stackoverflow.com/questions/3177953/how-to-bind-key-to-another-key-in-ubuntu

If you still need help after reading that (it's a bit tricky to
understand), post here again and we'll see what we can do.

BTW, unless you need a super gamer keyboard or you have a notebook and
don't want to use an external USB or wireless keyboard, replacement
keyboards are relatively cheap.

Joe
> --
> You received this message because you are subscribed to the Google
> Groups "autokey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autokey-user...@googlegroups.com
> <mailto:autokey-user...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


Steve Fisher

unread,
Nov 23, 2014, 5:55:31 AM11/23/14
to autoke...@googlegroups.com
Have a look at xmodmap, Arch Wiki is always a good source of info:
https://wiki.archlinux.org/index.php/xmodmap
Also xkeycaps is useful

Steve

--
You received this message because you are subscribed to the Google Groups "autokey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autokey-user...@googlegroups.com.

Ari Meyer

unread,
Nov 23, 2014, 6:17:16 AM11/23/14
to autoke...@googlegroups.com
Thank you, Joe and Steve.  I will try that.  Yeah, it's a laptop, and I use an external keyboard at home.  It's some problem with the internal membrane/electrical connection, not the key itself, so I'd have to replace the whole laptop keyboard to fix it. :-(

Regards,
Ari

Ari Meyer

unread,
Nov 23, 2014, 6:18:06 AM11/23/14
to autoke...@googlegroups.com
Thanks, Steve -- good to know where to look!
Ari

Ari Meyer

unread,
Nov 23, 2014, 6:40:14 AM11/23/14
to autoke...@googlegroups.com
xmodmap worked perfectly for this -- thanks!

Steve Fisher

unread,
Nov 23, 2014, 6:41:07 AM11/23/14
to autoke...@googlegroups.com
Another thing you can do, whilst a keyboard is connected is set up an abbreviation to type the letter "p" e.g.

when you type #o it types "p".

Steve

To unsubscribe from this group and stop receiving emails from it, send an email to autokey-user...@googlegroups.com.

Steve Fisher

unread,
Nov 23, 2014, 6:46:08 AM11/23/14
to autoke...@googlegroups.com
Inline images 1

Steve Fisher

unread,
Nov 23, 2014, 6:48:19 AM11/23/14
to autoke...@googlegroups.com
Ooops trigger immediately should be ticked :)

Steve
Reply all
Reply to author
Forward
0 new messages