LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-15-2019, 11:31 PM   #1
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: Kubuntu, MX-18
Posts: 31

Rep: Reputation: 0
xkeycaps -- Persistent Modified Keymap


I would like to use the xkeycaps program to make the "ins" key persistently act like the <Down> cursor key.

Please help.
 
Old 07-16-2019, 06:41 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,932
Blog Entries: 13

Rep: Reputation: 3420Reputation: 3420Reputation: 3420Reputation: 3420Reputation: 3420Reputation: 3420Reputation: 3420Reputation: 3420Reputation: 3420Reputation: 3420Reputation: 3420
I think you'd have better luck with xmodmap(1) which is what xkeycaps uses to accomplish its feats.
 
1 members found this post helpful.
Old 07-16-2019, 10:26 AM   #3
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Xubuntu
Posts: 5,280

Rep: Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804
An alternative is to simply modify your keyboard driver. The key-codes are set out in the file /usr/share/X11/xkb/keycodes/evdev
That contains the lines
<DOWN>=116;
<INS>=118;
Edit the file as root: swap the numbers and the keys swap functions. If you don't want a key to work, comment-out the entry with # at the start of the line and that key is no longer recognised. Changes take effect after the next log-in.
 
1 members found this post helpful.
Old 07-17-2019, 03:32 PM   #4
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: Kubuntu, MX-18
Posts: 31

Original Poster
Rep: Reputation: 0
A simple solution to remapping a couple of keys, but it didn't work for me. It's as if the altered evdev file is not being read at boot up. What am I missing?

Thanks.


Stan
 
Old 07-18-2019, 06:35 AM   #5
Geist
Member
 
Registered: Jul 2013
Distribution: Slackware 14 / current
Posts: 82

Rep: Reputation: Disabled
There is a chance that it IS working, but some other device messes with it.
My whole keyboard layout settings get borked whenever I turn on my wacom tablet, to the point where I have written udev rules that re-run the script I use to set all the things.
 
Old 07-18-2019, 10:27 AM   #6
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Xubuntu
Posts: 5,280

Rep: Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804
That's an odd problem. Try the command
Code:
setxkbmap -print
and tell us what it says. Also, what distro and hardware have you got?
 
Old 07-18-2019, 11:25 AM   #7
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: Kubuntu, MX-18
Posts: 31

Original Poster
Rep: Reputation: 0
$ setxkbmap -print
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete+ledscroll(group_lock)" };
xkb_symbols { include "pc+us+inet(evdev)+group(alt_shift_toggle)+terminate(ctrl_alt_bksp)" };
xkb_geometry { include "pc(pc105)" };
};
 
Old 07-18-2019, 11:27 AM   #8
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: Kubuntu, MX-18
Posts: 31

Original Poster
Rep: Reputation: 0
I think it worked partially. The down cursor quit working, but the INS key did not act as the down arrow.
 
Old 07-18-2019, 01:14 PM   #9
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: Kubuntu, MX-18
Posts: 31

Original Poster
Rep: Reputation: 0
I am using a Debian -- MX-18.

What hardware should I list? Run lshw and post the results?
 
Old 07-19-2019, 10:35 AM   #10
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Xubuntu
Posts: 5,280

Rep: Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804
The set-up looks fine. Let's check that the two keys are 116 and 118. Run the program xev in a terminal. That tells you what the keys are doing when you press them. When I press DOWN and INS, the third line of the output reads
state 0x0, keycode 116 (keysym 0xff54, Down), same_screen YES,
and
state 0x0, keycode 118 (keysym 0xff63, Insert), same_screen YES,
Do you get that, or something else?
 
Old 07-19-2019, 12:34 PM   #11
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: Kubuntu, MX-18
Posts: 31

Original Poster
Rep: Reputation: 0
Thanks, David.

When I press DOWN, I get state 0x0, keycode 116 (keysym 0xff54, Down), same_screen YES,
When I press INS, I get: state 0x0, keycode 90 (keysym 0xff9e, KP_Insert), same_screen YES,
 
Old 07-19-2019, 12:42 PM   #12
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: Kubuntu, MX-18
Posts: 31

Original Poster
Rep: Reputation: 0
The Numeric Key Lock is not on.
 
Old 07-20-2019, 07:55 AM   #13
Tyro65
Member
 
Registered: Jul 2009
Location: Sault Ste. Marie, ON
Distribution: Kubuntu, MX-18
Posts: 31

Original Poster
Rep: Reputation: 0
It seems that the main keyboard keys do not like to swap with numeric key pad keys. I tried other ones and they worked fine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Setting a modified and persistent 'xrandr' resolution with Mint 19.1 panorain Linux Mint 8 03-20-2019 03:23 PM
Persistent persistent Persistent Going Nuts Here Fcukinyahoo Linux - Newbie 6 11-17-2011 09:56 PM
[SOLVED] Preserve modified keymap across reboot in LXDE/Openbox nokangaroo Linux - Desktop 1 06-17-2011 12:53 AM
Changing Linux keymap to reflect dual-booted WinXP keymap AbuKaidman Linux - Newbie 2 07-18-2009 03:05 AM
Can someone help me install xkeycaps LinuxQuest01 Linux - General 2 07-11-2002 12:51 PM

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

All times are GMT -5. The time now is 11:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration