LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-08-2017, 12:45 PM   #1
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: MX-21
Posts: 55

Rep: Reputation: 0
Remap a key


I want to change the Menu (KeyCode 135, KeySym 0xff67) key to a cursor down (KeyCode 116, KeySym 0xff54) key. Any suggestions? Would a program like AutoKey work? Is there a way to edit /usr/share/X11/xkb/symbols/be to remap the Menu key to act like the down arrow?

Thanks.

Last edited by Tyro65; 09-08-2017 at 05:08 PM.
 
Old 09-09-2017, 03:24 AM   #2
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,621
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by Tyro65 View Post
I want to change the Menu (KeyCode 135, KeySym 0xff67) key to a cursor down (KeyCode 116, KeySym 0xff54) key. Any suggestions? Would a program like AutoKey work? Is there a way to edit /usr/share/X11/xkb/symbols/be to remap the Menu key to act like the down arrow?

Thanks.
Use xmodmap and if you like, also see this thread: https://www.linuxquestions.org/quest...es-4175612934/

Many resources on the Web. Do not search, believe this: http://cs.gmu.edu/~sean/stuff/n800/keyboard/old.html or use the man-page.

Cheerio.
 
Old 09-09-2017, 01:20 PM   #3
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: MX-21
Posts: 55

Original Poster
Rep: Reputation: 0
Thanks, Michael.

I've been reading the information in the links you gave me, but I'm trying to keep it simple.

I want to permanently change the Ins/0 key on the numeric keypad to a down arrow key. What would I need to include in the xmodmap?


Stan
 
Old 09-09-2017, 05:03 PM   #4
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: MX-21
Posts: 55

Original Poster
Rep: Reputation: 0
I created a file in /home/stan/ModMap/.Xmodmap. I changed the line
keycode 90 = KP_Insert KP_0 KP_Insert KP_0
to
keycode 90 = Down NoSymbol Down

I tred to activate it with: xmodmap /home/stan/ModMap/.Xmodmap

It worked at the time, but not on reboot.

What am I screwing up?
 
Old 09-10-2017, 03:45 AM   #5
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,621
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by Tyro65 View Post
What am I screwing up?
Not enough

You must call xmodmap upon starting up your desktop environment, whichever that may be. The x-server knows startup-scripts, too. A lot of those things, that you may call “permanent” are just due to routines executed in that way, each time that you start a new session (of whichever kind). I do not know an awful lot of desktop environments and do not want to talk bull. And even if I do not consider my own choices the “Best Ever”, I tend to use them as example (ignore, if you must):

My window-manager fluxbox has a startup script which is named “startup”. In this script, I noted a line
Code:
xmodmap "/home/[user]/.Xmodmap"
and that's all for me. The “new” keyboard-setting is now “permanent”.

Find something like that for whichever environment you are using, or try xinit. Something will work.
 
Old 09-10-2017, 11:07 AM   #6
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,140

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
If you want to keep things simple, why use xmodmap? Look at
/usr/share/X11/xkb/keycodes/evdev
and you have an entry
<MENU> = 135;
Change it to
<DOWN> = 135;
and that's it.

Last edited by DavidMcCann; 09-10-2017 at 11:15 AM. Reason: Terribe mistake!
 
Old 09-10-2017, 11:36 AM   #7
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,621
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by DavidMcCann View Post
If you want to keep things simple, why use xmodmap?
Because I recommended it. I think the OP rather wanted to exclude xmodmap.
Quote:
Look at
/usr/share/X11/xkb/keycodes/evdev
and you have an entry
<MENU> = 135;
Change it to
<DOWN> = 135;
and that's it.
90 here... if we talk about Insert/0 on the numeric keypad. Keep a backup of the original evdev-file.

Last edited by Michael Uplawski; 09-10-2017 at 11:37 AM.
 
Old 09-10-2017, 06:42 PM   #8
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: MX-21
Posts: 55

Original Poster
Rep: Reputation: 0
Thank you, Micheal.
Thank you, David.

I've got it working. I'm learning.


Stan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remap a missing keyboard key to another one SteveThePirate87 Linux - Hardware 1 04-19-2014 04:56 PM
[SOLVED] Key remap interndan Slackware 14 03-08-2012 11:27 AM
Key remap Silverdaz Linux - Software 1 07-08-2004 11:35 AM
remap keyboard windows key khtse Slackware 2 07-01-2004 01:14 PM
Key remap Silverdaz Fedora 0 06-23-2004 08:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration