LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 12-18-2017, 04:09 PM   #1
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 435

Rep: Reputation: 28
Running xmodap to modify keyboard


Running Slackware-14.2 with Xfce4 on all hosts. I have one desktop (server/workstation) and three portables: Dell Latitude E5410 laptop, Lenovo ThinkPad x200 tablet, and Dell Latitude 2100 netbook. I log in to run level 3, then manually invoke startx if I'm not working on the console.

Because I work a lot with emacs I set many applications to use the same keyboard chords. Therefore, many years ago I wrote ~/.Xmodmap to swap the left Ctrl and CapsLock keys:

remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
keysym Alt_L = Meta_L Alt_L

This has worked flawlessly on the desktop in ~/.bash_profile. However, it does not work on any of the portables. I've tried invoking it in ~/.xinitrc and other files based on web searches, yet have not found a working solution. I need to manually enter the command in each virtual terminal, sometimes twice, before it takes. This is for both user and root.

Is there a place, perhaps in an /etc/ config file where I can enter the command 'xmodmap ~/.Xmodmap' so that it is consistenly invoked for all applications when I start X? I've suffered with this for years and would really like to find a solution.
 
Old 12-19-2017, 10:51 AM   #2
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,138

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Why are you using Xmodmap (which sometimes disagrees with modern desktops) when you have a perfectly serviceable keyboard configuration tool in Xfce? This isn't my Xfce computer, so I can't check, but I'd be very surprised if it didn't include the option to swap LCtrl and CapsLock — so many people do that. You shouldn't have to define Alt as Meta, as they are normally synonyms. Of course I can't vouch for what Slackware might get up to!
 
  


Reply

Tags
xmodmap



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
Is it possible to modify ALSA configuration (asoundrc or asound.conf) while an application is running? radshere Linux - Newbie 1 10-16-2017 11:40 PM
How to modify keyboard.c in 3.7 kernel to turn on numlock? buckprivatemil Linux - Kernel 2 02-11-2013 12:47 PM
Broken keyboard on laptop/modify BIOS Gudularite Linux - Hardware 2 04-04-2009 05:40 AM
How to modify my .bashrc in general to accomodate running binaries (e.g. SCHEME)? Erik_the_Red Linux - Software 1 08-01-2005 12:23 PM
modify file access & modify timestamps i2itstud Linux - General 1 05-20-2003 03:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 09:52 AM.

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