SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-03-22 10:31:09

rich
#! Junkie
From: barcelona
Registered: 2009-01-26
Posts: 414
Website

Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

I had a problem with the Spanish keyboard on my Acer Aspire 3004 laptop. This is how I solved the problem of the standard "es" keyboard settings not giving me use of Alt or Alt-Gr keys.

Note: Before reading the member fixes below, also have a look at the Crunchbang wiki which contains useful information related to configuring keyboards, keymaps and keybindings:
http://crunchbanglinux.org/wiki/howto/keyboard_settings
http://crunchbanglinux.org/wiki/configuring_keybindings

Laptop with Spanish Keyboard
Edit  /etc/default/keyboard to "es" and "105"

XKBMODEL="pc105"
XKBLAYOUT="es"
XKBVARIANT=""
XKBOPTIONS=""

Keyboard Configuration Tool:
There is also a built in Keyboard Configuration tool that you can use, which will also edit /etc/default/keyboard:

sudo dpkg-reconfigure keyboard-configuration

Keyboards with Two Languages:
Kodx posted a fix for dual-language keyboards as well as having Keyboard options such as the old "Ctrl+Alt+Backspace" to restart X:
This is his example with a dual US and Russian layout

XKBMODEL="pc105"
XKBLAYOUT="us,ru"
XKBVARIANT=","
XKBOPTIONS="grp:caps_toggle,terminate:ctrl_alt_bksp,grp_led:scroll"

Kodx also offered some different key combination options for toggling between languages:

grp:caps_toggle - CapsLock
grp:alt_shift_toggle - Alt+Shift
grp:ctrl_shift_toggle - Ctrl+Shift

Then update Hal to keep the settings:

/etc/init.d/hal restart

(Optional) Disabling the Crunchbang System Tray Keyboard Switcher:
Comment out the keyboard settings on ~/.config/openbox/autostart.sh

# Set-up keyboard maps and sytem tray switcher
# tip - quickly toggle between keyboard maps by holding both shift keys!
#setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll gb,us,de,fr,es &
#(sleep 1s && fbxkb) &
# ^^ note: if using the LiveCD, you can also change to a different
#          keyboard map by entering the terminal command:
#              setxkbmap xx
#          Where "xx" is the 2 letter country code.

Last edited by rich (2010-04-01 22:04:01)

Offline

Help fund CrunchBang, donate to the project!

#2 2010-03-29 19:58:58

rich
#! Junkie
From: barcelona
Registered: 2009-01-26
Posts: 414
Website

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

*bump* as people are still posting about getting the keyboard wrongly mapped, or not knowing how to "permanently" set the keyboard config.

Offline

#3 2010-03-29 23:08:28

liame
#! CrunchBanger
Registered: 2009-09-01
Posts: 100

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

i tried that, but wasn't so good for me.
i use english/hebrew (log in, in english, some internet and writing stuff in hebrew)
now to switch between them i need to use both shift keys, i would prefer alt+shift.
after editing the /etc/defaults/keyboard
i got the system only working in hebrew, so i couldn't log in (used the live-usb to change back that)
besides that mapping does seems to work fine in both languages.

Offline

#4 2010-03-30 08:44:33

kodx
Member
From: Russia
Registered: 2010-03-26
Posts: 24

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

liame wrote:

i tried that, but wasn't so good for me.
i use english/hebrew (log in, in english, some internet and writing stuff in hebrew)
now to switch between them i need to use both shift keys, i would prefer alt+shift.
after editing the /etc/defaults/keyboard
i got the system only working in hebrew, so i couldn't log in (used the live-usb to change back that)
besides that mapping does seems to work fine in both languages.

File /etc/default/ketboard handles system-wide config. Here is mine

XKBMODEL="pc105"
XKBLAYOUT="us,ru"
XKBVARIANT=","
XKBOPTIONS="grp:caps_toggle,terminate:ctrl_alt_bksp,grp_led:scroll"

This config change layout with CAPSLOCK key.

In your case you should change
XKBLAYOUT="us,ru" to XKBLAYOUT="us,il" (or what you prefer)
XKBOPTIONS="grp:caps_toggle,terminate:ctrl_alt_bksp,grp_led:scroll" to XKBOPTIONS="grp:alt_shift_toggle,terminate:ctrl_alt_bksp,grp_led:scroll"

I hope this helps.

Sorry for my english, i'm from Russia.

Offline

#5 2010-03-30 23:57:14

Apollo
Member
From: Toronto, Ontario, Canada
Registered: 2010-02-23
Posts: 12
Website

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

I have a similar problem. and it doesn't help that I know squat about the xorg.conf file.  I've grown quite accustomed to the US_Intl AltGr (dead keys) keyboard layout.  I have a standard US English keyboard and just use my right Alt key for an AltGr key.  Maybe someone who's done this successfully could post a step by step of how to change from the default mapping to a US_Intl AltGr (dead keys) mapping.  I'm sure I'm not the only one it would benefit.

Edit: Mere seconds after posting this I had a Eureka! moment with the OP.  So now that I know how to change the layout, can anyone tell me what to change it to?  An example perhaps?  And maybe point out what each variant and option actually means/does?

Re-Edit:  I think I got it. 

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT="intl"
XKBOPTIONS="lv3:ralt_switch"

The only thing now is to change my apostrophe key.  Now, by default it is an accent, and the alt-gr mapped version is the real apostrophe.  I'm going to try to figure out how to change that.  Will post results.  Thanks for patience and sorry if I'm spamming.

Last edited by Apollo (2010-03-31 01:32:23)


Registered Linux user #508546

Offline

#6 2010-03-31 05:33:34

Toolz
#! Die Hard
From: Asia
Registered: 2009-02-02
Posts: 937

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

The keyboard on this Eee won't handle the Shift key properly with Statler OB. Left shift key won't work with a selection of keys and right shift doesn't work with a different, larger selection. They overlap so there's no way to get : and "

The two lines in autostart.sh are commented out and /etc/default/keyboard looks like the above - with 'us'. Any other Eee owners getting trouble?

Offline

#7 2010-03-31 12:17:33

semog
#! Member
From: Portugal
Registered: 2010-03-23
Posts: 53

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

im trying put my keyboard uk to uk extended but i dont know how
searching on google i dont find anything

Offline

#8 2010-03-31 13:13:23

liame
#! CrunchBanger
Registered: 2009-09-01
Posts: 100

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

kodx wrote:
liame wrote:

i tried that, but wasn't so good for me.
i use english/hebrew (log in, in english, some internet and writing stuff in hebrew)
now to switch between them i need to use both shift keys, i would prefer alt+shift.
after editing the /etc/defaults/keyboard
i got the system only working in hebrew, so i couldn't log in (used the live-usb to change back that)
besides that mapping does seems to work fine in both languages.

File /etc/default/ketboard handles system-wide config. Here is mine

XKBMODEL="pc105"
XKBLAYOUT="us,ru"
XKBVARIANT=","
XKBOPTIONS="grp:caps_toggle,terminate:ctrl_alt_bksp,grp_led:scroll"

This config change layout with CAPSLOCK key.

In your case you should change
XKBLAYOUT="us,ru" to XKBLAYOUT="us,il" (or what you prefer)
XKBOPTIONS="grp:caps_toggle,terminate:ctrl_alt_bksp,grp_led:scroll" to XKBOPTIONS="grp:alt_shift_toggle,terminate:ctrl_alt_bksp,grp_led:scroll"

I hope this helps.

Sorry for my english, i'm from Russia.


Oh yikes , hmm of course, roll i should have thought by myself about actually needing to add my both layouts.
bravo liame, bravo. shame on me.

big thanks!

Offline

#9 2010-03-31 14:05:55

rich
#! Junkie
From: barcelona
Registered: 2009-01-26
Posts: 414
Website

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

Nice one kodx!!

I have added your tips to the first post guide. Hopefully as more and more suggestions and solutions are posted, I can keep updating this Howto so that it includes the more common problems.

rich

Offline

#10 2010-03-31 22:42:24

Apollo
Member
From: Toronto, Ontario, Canada
Registered: 2010-02-23
Posts: 12
Website

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

I can't for the life of me figure out how to fix this apostrophe problem. Hitting apostrophe once and then space produces one, but tapping it once and then a letter produces śáéẃ etc...  tapping twice causes ´... Any clues?


Registered Linux user #508546

Offline

#11 2010-04-01 07:39:57

rich
#! Junkie
From: barcelona
Registered: 2009-01-26
Posts: 414
Website

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

That's not an apostraphe, it's an accent. I have them on my Spanish keyboard. So usually to get an accent you would hit a letter and then the accent and it apears on top of the letter - éíáó etc

What keyboard layout are you using? It sounds to me as if you have one of the Mediterranean languages set for some reason.

rich

Offline

#12 2010-04-01 21:07:46

kodx
Member
From: Russia
Registered: 2010-03-26
Posts: 24

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

Great job richs-lxh!
I want you to make some fixes.
My configuration for CapsLock switcher, but many people prefer to change their layout with Alt+Shift(who recently switched from windows).

XKBOPTIONS="grp:caps_toggle,terminate:ctrl_alt_bksp,grp_led:scroll"

This option - grp:caps_toggle handles what key switch your layout.
Here is some examples:

grp:caps_toggle - CapsLock
grp:alt_shift_toggle - Alt+Shift
grp:ctrl_shift_toggle - Ctrl+Shift

There is debian specific configuration util for this, here is command

sudo dpkg-reconfigure keyboard-configuration

But in statler there is only USA layouts and i don't know how to add my local layouts, maybe somebody know how to do this?
I've installed Debian Testing from official repo and then i call

sudo dpkg-reconfigure keyboard-configuration 

there was my local layouts.

Offline

#13 2010-04-01 21:56:09

rich
#! Junkie
From: barcelona
Registered: 2009-01-26
Posts: 414
Website

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

kodx wrote:

But in statler there is only USA layouts and i don't know how to add my local layouts, maybe somebody know how to do this?
I've installed Debian Testing from official repo and then i call

sudo dpkg-reconfigure keyboard-configuration 

there was my local layouts.

I just used:

sudo dpkg-reconfigure keyboard-configuration

And it offered me the Spanish configs which led me to believe that it uses the /etc/default/keyboard file to get it's information. I had already added the "es" 105 options manually.

Sure enough, after changing the configuration, my /etc/default/keyboard configuration had changed:

XKBMODEL="pc105"
XKBLAYOUT="es"
XKBVARIANT="cat"
XKBOPTIONS="lv3:ralt_switch,terminate:ctrl_alt_bksp"

Try manually editing /etc/default/keyboard and then running keyboard-configuration again.

Last edited by rich (2010-04-01 21:57:20)

Offline

#14 2010-04-02 11:24:26

slapfish
#! Die Hard
From: Athens, Greece
Registered: 2009-10-22
Posts: 601

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

I have made this post on help section but I think it could be placed here too, since It concerns Statler.

Hello,

I have the Acer Aspire 5635wlmi laptop and I miss a lot 2 keys from my keyboard. On both sides of up arrow I have one key for Euro sign and one for dollar. I used xev so I could enable them from rc.xml but both keys are dead (nothing happening if I press them). Also I have the euro sign under "e" but I guess I have to enable that shortcut too. I don't mind about dollar since I can get it with shift+4 but I would like to have euro sign.


what can I do? maybe use another keyboard layout?


/etc/defaults/keyboard:

XKBMODEL="pc105"
XKBLAYOUT="us,gr"
XKBVARIANT=","
XKBOPTIONS="grp:switch,grp:alt_shift_toggle,grp_led:scroll"

This is more or less my keyboard:
th_acerkeyb.jpg

the actual post

Offline

#15 2010-04-02 12:32:31

Apollo
Member
From: Toronto, Ontario, Canada
Registered: 2010-02-23
Posts: 12
Website

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

richs-lxh wrote:

That's not an apostraphe, it's an accent. I have them on my Spanish keyboard. So usually to get an accent you would hit a letter and then the accent and it apears on top of the letter - éíáó etc

What keyboard layout are you using? It sounds to me as if you have one of the Mediterranean languages set for some reason.

rich


I know it's an accent.  That's the problem.  I'm using a us keyboard with the us-intl layout.  BUT!!!

The configurator worked like a charm.  I now have my precious us-intl-altgr dead keys layout back.

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT="altgr-intl"
XKBOPTIONS="lv3:ralt_switch,terminate:ctrl_alt_bksp"

There's the /etc/default/keyboards contents for anyone who is interested.


Registered Linux user #508546

Offline

#16 2010-04-02 23:10:31

rich
#! Junkie
From: barcelona
Registered: 2009-01-26
Posts: 414
Website

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

Apollo wrote:

I know it's an accent.  That's the problem.  I'm using a us keyboard with the us-intl layout.  BUT!!!

The configurator worked like a charm.  I now have my precious us-intl-altgr dead keys layout back.

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT="altgr-intl"
XKBOPTIONS="lv3:ralt_switch,terminate:ctrl_alt_bksp"

There's the /etc/default/keyboards contents for anyone who is interested.

If you aren't on an international laptop, then I would suggest changing the pc105 to pc104.

Offline

#17 2010-04-04 22:50:10

kodx
Member
From: Russia
Registered: 2010-03-26
Posts: 24

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

richs-lxh wrote:

Try manually editing /etc/default/keyboard and then running keyboard-configuration again.

Worked like a charm! I've added XKBLAYOUT="us,ru" and started

sudo dpkg-reconfigure keyboard-configuration 

then utility gave me locales list, there was Russian.

I think you should do a complete how-to about this layouts switcher, including above command. And add

sudo dpkg-reconfigure locales

to configure locales, but i think everybody do this during install.

Thanks for help.

Offline

#18 2010-04-04 23:41:08

rich
#! Junkie
From: barcelona
Registered: 2009-01-26
Posts: 414
Website

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

No problem.
With everybody adding their personal experience we are getting quite a collection of keyboard config methods. smile

Offline

#19 2010-04-06 13:40:38

evilyves
New Member
Registered: 2010-04-04
Posts: 8

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

you may check my post:
http://crunchbanglinux.org/forums/topic … t-working/

perhaps we can merge this post into yours.

Offline

#20 2010-04-06 14:43:48

Andreas
#! Junkie
Registered: 2010-01-26
Posts: 277

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

my way of setting the keyboard to us international is:

setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll gb,us,de,fr,es &

changed into

setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll us_intl,us,gb,de,fr,es &

was the first option I found, and it worked for me smile

by the way, when you hit " once with us_intl (or at least one with dead keys) and then let's say an a, you'll get ë.
when you hit " and a space, you get ". but, if you hit " and another time "  you get the two dots above the ë seperate, instead of "" what I would like.
This is the way Windows types, I was wondering if there was a setting / workaround to change it.

Thanks in advance for helping!


Meh. Interested for a Dropbox alternative? Go to https://launchpad.net/tart

Offline

#21 2010-04-07 21:23:06

Dr.Strangelove
Member
From: A movie from the early 60s
Registered: 2009-02-21
Posts: 37

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

Using statler Xfce here, I tried "sudo dpkg-reconfigure keyboard-configuration" to get a German keyboard and also used the GUI keyboard configurator.

Still have to do the latter at the start of every seession.

Maybe something for http://crunchbanglinux.org/wiki/statler-alpha-02-todo?


--
"Strangelove? What kind of a name is that? That ain't no Kraut name, is it, Stainesey?" - "He changed it when he became a citizen. Used to be Merkwuerdigeliebe."

Offline

#22 2010-04-09 10:35:45

evilyves
New Member
Registered: 2010-04-04
Posts: 8

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

Dr.Strangelove wrote:

Using statler Xfce here, I tried "sudo dpkg-reconfigure keyboard-configuration" to get a German keyboard and also used the GUI keyboard configurator.

Still have to do the latter at the start of every seession.

Maybe something for http://crunchbanglinux.org/wiki/statler-alpha-02-todo?

you have to change autostart.sh in for openbox configuration. i dont know the complete path because im working on rhel right now.
But i think you can reach it via the menu (sth. like settings/openbox/autostart.s).

Search for "setxkbmap". There you have to change "gb,us,de,fr" to start with "de". (i.e. de,gb,us,fr) or completly remove the other langs.

"setxkbmap de" works finde for me.

Offline

#23 2010-04-09 12:13:17

Dr.Strangelove
Member
From: A movie from the early 60s
Registered: 2009-02-21
Posts: 37

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

evilyves wrote:

you have to change autostart.sh in for openbox configuration. (...)

Thanks a lot, pal!
I am not at home presently, but will try that tonight.  Using Xfce here as I said, was not even aware I have an "openbox configuration" on my machine.

WIll report back about the success, cheers!


--
"Strangelove? What kind of a name is that? That ain't no Kraut name, is it, Stainesey?" - "He changed it when he became a citizen. Used to be Merkwuerdigeliebe."

Offline

#24 2010-04-09 12:41:41

evilyves
New Member
Registered: 2010-04-04
Posts: 8

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

your are welcome, let me know if you need some help.

Offline

Be excellent to each other!

#25 2010-04-09 19:04:30

Dr.Strangelove
Member
From: A movie from the early 60s
Registered: 2009-02-21
Posts: 37

Re: Howto International Keyboards /Keybindings/Alt-Gr/Keymaps/Options

Hmmm, sorry to report:

As I said, I am using Statler Xfce (btw, am I the only one in this thread yet who does?). Unsurprisingly, there is no ~/.openbox/autostart.sh. In fact, there is no ~/.openbox or~/.config/openbox.

There is, however, a ~/.config/xfce4/autostart.sh which does not mention any keyboard configuration settings.

There also is a ~/.config/user-dirs.locale, which looked promising first. Changing en_GB to de_DE did not help, however.

So I still have to change keyboard settings every time I log in.


--
"Strangelove? What kind of a name is that? That ain't no Kraut name, is it, Stainesey?" - "He changed it when he became a citizen. Used to be Merkwuerdigeliebe."

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo