LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-18-2016, 04:20 PM   #1
Steve Greig
LQ Newbie
 
Registered: Oct 2016
Posts: 27

Rep: Reputation: Disabled
Keymap problem: hash key gives a backslash etc etc


I have just installed 14.2 on my emachines laptop. During installation I choose the UK keymap (at least that was what I intended). Now whether I am using bash or a word processing document a lot of keys give the wrong character. Letters and numbers are ok.

Any insight into this would be great, Steve
 
Old 10-19-2016, 12:35 AM   #2
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
This should set you in the right direction.
https://docs.slackware.com/howtos:wi...eyboard_layout
 
1 members found this post helpful.
Old 10-19-2016, 06:19 AM   #3
EasySlacker
LQ Newbie
 
Registered: Oct 2016
Location: Area 51000
Distribution: Slackware
Posts: 6

Rep: Reputation: 1
Maybe it's just about the variant. There are different variants of the layout, so why don't you try them all and see which one works for you? Btw, I use Xfce desktop environment, and to easily switch between layouts I've set layout option to Alt+Caps Lock in Applications/Settings/Keyboard/Layout/Change layout option. Works like a charm.
 
1 members found this post helpful.
Old 10-19-2016, 08:17 AM   #4
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
The slackware installer only sets the keyboard layout used for the console. X11 will need some intervention for the non-american amongst us.

Running "setxkbmap gb" will temporarily set the keyboard to the UK layout for the current session.


A more permanent solution is to add something along the lines of the following to your system:
Code:
# /etc/X11/xorg.conf.d/90-keyboard.conf ################################

Section "InputClass"
        Identifier "keyboard-gb"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "gb"
        #Option "XkbVariant" ""
        Option "XkbOptions" "terminate:ctrl_alt_bksp,compose:rctrl-altgr"
EndSection

########################################################################
Personally, I recommend avoiding any keyboard settings that may be in the settings dialogs of your Desktop Environment and use the above instead.

Last edited by GazL; 10-19-2016 at 08:19 AM.
 
1 members found this post helpful.
Old 10-19-2016, 12:49 PM   #5
Steve Greig
LQ Newbie
 
Registered: Oct 2016
Posts: 27

Original Poster
Rep: Reputation: Disabled
Keymap problem: hash key gives a backslash etc etc

I am still having a problem with this. The howto suggests there is a file (/usr/share/x11/xorg.conf.d/90-keyboard-layout.conf) that needs to be opened and edited and then saved in a different location. I dont seem to have that file. I cant see an x11 directory in the /usr/share directory.
 
Old 10-19-2016, 01:24 PM   #6
Steve Greig
LQ Newbie
 
Registered: Oct 2016
Posts: 27

Original Poster
Rep: Reputation: Disabled
Keymap problem: hash key gives a backslash etc etc

when I cd to /usr/share and do ls I cannot see an x11 directory. When I do locate 90-keyboard-layout.conf the result is /usr/share/x11/xorg.conf.d/90-keyboard-layout.conf
 
Old 10-19-2016, 01:36 PM   #7
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
It's a capital X. UNIX/linux is case sensitive.
 
1 members found this post helpful.
Old 10-19-2016, 05:47 PM   #8
Steve Greig
LQ Newbie
 
Registered: Oct 2016
Posts: 27

Original Poster
Rep: Reputation: Disabled
I thought I might have got there as I managed to edit the file as suggested and get it into the new directory. I restarted the computer and typed startx at the prompt but same problem with the keys as before.

I have the following in /etc/X11/xorg.conf.d/90-keyboard-layout.conf


Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbLayout" "gb"
#Option "XkbVariant" ""
Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

I see this is different from that suggested by GAZL but it seems to be the same as the howto linked to by STDOUBT. I just went to the System Settings in KDE and made the change suggested by EasySlacker and that has done the trick which is great. I guess I will leave it at that but have noted GAZL's point about him preferring to edit the file than use system settings. I have certainly learned a certain amount about the system although still confused to say the least. Thanks for your help.
 
Old 10-20-2016, 06:09 AM   #9
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
You're welcome. The differences between what I posted and what is in the howto are not significant, they both should work for you.

The drawback to using the KDE/XFCE settings is that like setxkbmap they are basically just per-user and per-environment overrides (albeit unlike 'setxkbmap', overrides that are reapplied for you each time you login).

By changing the xorg.conf you're actually changing your XServer's default mapping. The reason I prefer the xorg.conf way is that it applies across all users and all desktop environments, not just KDE or XFCE. If you only ever use the same one then that probably won't matter to you. If you hop between users, or desktop environments and basic-window manager based environments then the xorg.conf approach will serve you better.


This is just my opinion of course, you are free to think differently.
 
2 members found this post helpful.
  


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
Changing Linux keymap to reflect dual-booted WinXP keymap AbuKaidman Linux - Newbie 2 07-18-2009 03:05 AM
converting Dos link backslash to Unix like backslash barunparichha Linux - Software 1 05-14-2009 09:54 AM
What is the best way to handle the hash key used to decrypt database fields? abefroman Linux - Security 2 06-10-2008 03:40 AM
Using hash value as key for other hash in Perl scuzzman Programming 6 02-14-2006 05:08 PM
Hash Key on keyboard changed functioin!? breakerfall Linux - General 1 01-11-2004 08:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:00 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