Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
09-14-2017, 12:11 PM
|
#31
|
LQ Veteran
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,229
|
Quote:
Originally Posted by David S
Doesn't work with my UK keyboard.
|
It's not supposed to! The US keyboard driver is not the same as the UK one.
|
|
|
09-14-2017, 12:19 PM
|
#32
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
|
Quote:
Originally Posted by DavidMcCann
It's not supposed to! The US keyboard driver is not the same as the UK one.
|
That shouldn't make a difference. The issue here is getting the Win key to work in the same way as Alt-Gr rather than being "something else".
|
|
|
09-14-2017, 12:43 PM
|
#33
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
Code:
~ $ cat .Xmodmap
keycode 133 = Mode_switch
keycode 13 = 4 dollar 4 cent
keycode 24 = q Q otilde Otilde
keycode 26 = e E EuroSign cent
keycode 30 = u U udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis
keycode 38 = a A adiaeresis Adiaeresis
keycode 39 = s S scaron Scaron
keycode 40 = d D degree
keycode 52 = z Z zcaron Zcaron
keycode 58 = m M Greek_mu
Should be self-explanatory?
|
|
|
09-14-2017, 12:47 PM
|
#34
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
|
Quote:
Originally Posted by Emerson
Code:
~ $ cat .Xmodmap
keycode 133 = Mode_switch
keycode 13 = 4 dollar 4 cent
keycode 24 = q Q otilde Otilde
keycode 26 = e E EuroSign cent
keycode 30 = u U udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis
keycode 38 = a A adiaeresis Adiaeresis
keycode 39 = s S scaron Scaron
keycode 40 = d D degree
keycode 52 = z Z zcaron Zcaron
keycode 58 = m M Greek_mu
Should be self-explanatory?
|
Yes, but...
The UI gives a way to set these things up without (at least directly) editing the files and it's not that difficult. The UI way also works with other keyboard layouts as there's no hard-coding involved.
|
|
|
09-14-2017, 01:38 PM
|
#35
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
I'm sure there are UI's for everything nowadays. There is none in my computers. I do not use ready-to-use desktop environments, my solutions are desktop agnostic. Also, xmodmap works with any keyboard layout.
|
|
|
09-14-2017, 01:39 PM
|
#36
|
LQ Newbie
Registered: Sep 2017
Location: Whitstable Kent Famous for Oysters
Distribution: Lubuntu
Posts: 19
Original Poster
Rep: 
|
Quote:
Originally Posted by Emerson
What did you do to configure the dead key to switch modes?
|
How do you do that?
|
|
|
09-14-2017, 01:44 PM
|
#37
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
You pull your current configuration.
Code:
xmodmap -pk > keymap
Then you make your corrections, and create your ~/.Xmodmap file.
Load it.
Note, traditional Linux setups will load it automatically. Modern Desktop Environments may ignore conventions, in this case you need to load it by hand every time or find a way to load it automatically using mechanisms provided by your DE.
|
|
|
09-14-2017, 07:22 PM
|
#38
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by David S
Thank you I did read that before but I didn't didn't know the term you used,(LXDE) sorry I didn't come back to you then.
As I said, I am new to Linux and still trying to get my head around it all. I am getting a bit long in the tooth and my brain doesn't cope so well with learning new things as it did when I was younger.
|
Hi David_S,
LXDE is the name of the desktop environment (the graphical user interface, or GUI) used with Lubuntu. Sorry I didn't think of specifying that.
Again, the most common way to resolve this very common need is as I suggested in post #13:
- modify your xorg configuration to enable a second keyboard layout. This can be done by creating a file in your /etc/xorg.conf.d directory called 00-keyboard.conf. The contents of this file would be along these lines:
Code:
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "uk,ca"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection
- Add the Keyboard Layout Handler applet to your panel in LXDE (your desktop environment's lower panel). This is done by right-clicking on an empty part of the task bar panel and choosing "Add Remove Panel Items". Then choose "Keyboard Layout Handler". A little flag should then appear in your task bar denoting the input language then active. In my case this is the US flag when I am using a US English keyboard layout and a Canadian flag when using the Canadian French keyboard layout. The 2 options identified in the above file as "XkbLayout" determine your keyboard layout language choices - you can use different ones if you like.
The "grp:alt_shift_toggle" options identifies the ALT-SHIFT key combination as the keyboard layout switching hotkey combination. Again, several are supported.
Hope this helps !
|
|
2 members found this post helpful.
|
All times are GMT -5. The time now is 11:13 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|