Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-10-29 22:53:17

David Gerard
Member
Registered: 2011-10-27
Posts: 11

[Solved] How to set usual Xkb options? (e.g. CapsAsCtrl)

I have just installed Xubuntu 11.10 (XFCE 4.8) and my favoured GNOME applications. Mostly good so far.

One massive frustration: I'm used to having the Caps Lock key set to be Ctrl. There's a standard X option for this, and it's exposed in the settings in GNOME2 and KDE ... but I can't find it anywhere in XFCE.

Someone suggested I try xfce4-xkb-plugin, but that plugin is for switching between layouts, not setting these options.

Is there a standard way to access this stuff in XFCE?

Offline

#2 2011-10-30 08:56:55

jeromeg
Moderator
From: France
Registered: 2010-11-11
Posts: 131
Website

Re: [Solved] How to set usual Xkb options? (e.g. CapsAsCtrl)

There is no interface for this in Xfce. On my debian box I tweak the /etc/default/keyboard file, the same should work in Xubuntu. For example, to use CapsLock as Compose key, I have:

XKBOPTIONS="compose:caps"

Cheers,

Jérôme

Offline

#3 2011-10-30 09:08:31

David Gerard
Member
Registered: 2011-10-27
Posts: 11

Re: [Solved] How to set usual Xkb options? (e.g. CapsAsCtrl)

The workaround I ended up using was to add this to my XFCE autostart items:

/usr/bin/setxkbmap -option "ctrl:nocaps"

Which is, of course, the sort of thing that the nice interface in GNOME/KDE actually does :-)

Last edited by David Gerard (2011-10-30 09:09:27)

Offline

#4 2011-10-30 14:35:34

mike555
Member
Registered: 2011-08-01
Posts: 18

Re: [Solved] How to set usual Xkb options? (e.g. CapsAsCtrl)

Can you tell me the text to change capslock to L shift (with no lock)   or just disable capslock key altogether

Last edited by mike555 (2011-10-30 14:38:30)

Offline

#5 2011-10-30 22:28:15

David Gerard
Member
Registered: 2011-10-27
Posts: 11

Re: [Solved] How to set usual Xkb options? (e.g. CapsAsCtrl)

mike555 - caps:none disables capslock altogether.

There's a full list of setxkbmap option codes in /usr/share/X11/xkb/rules/xorg.lst

Offline

#6 2011-12-19 20:06:28

dlj0
Member
From: Lehigh University
Registered: 2011-12-19
Posts: 1

Re: [Solved] How to set usual Xkb options? (e.g. CapsAsCtrl)

David Gerard wrote:

mike555 - caps:none disables capslock altogether.

There's a full list of setxkbmap option codes in /usr/share/X11/xkb/rules/xorg.lst


I have XKBOPTIONS="caps:none"  in my /etc/default/keyboard file and it does nothing.  Stupid caps lock still works.  I just recently jumped to xfce4 when gnome 3 became part of debian testing.  Mostly, xfce is a blessed relief.  But this annoys me.  Caps lock is, to me, a stupid key to have, especially where it is on my keyboard.  What else should I try?  I also have my .Xmodmap file (in HOME) with  clear Lock in it, suggested by another.  Anything else to try?

Offline

#7 2011-12-20 17:13:46

Mellowbob
Member
Registered: 2011-10-16
Posts: 57

Re: [Solved] How to set usual Xkb options? (e.g. CapsAsCtrl)

In my startup applications I have a command:

     /usr/bin/setxkbmap -option "ctrl:nocaps"

which takes care of the problem.

Offline

#8 2011-12-21 00:30:24

efx
Member
Registered: 2011-12-05
Posts: 5

Re: [Solved] How to set usual Xkb options? (e.g. CapsAsCtrl)

dlj0 wrote:

I have XKBOPTIONS="caps:none"  in my /etc/default/keyboard file and it does nothing.  Stupid caps lock still works.  I just recently jumped to xfce4 when gnome 3 became part of debian testing.  Mostly, xfce is a blessed relief.  But this annoys me.  Caps lock is, to me, a stupid key to have, especially where it is on my keyboard.  What else should I try?  I also have my .Xmodmap file (in HOME) with  clear Lock in it, suggested by another.  Anything else to try?

dlj0,

I have not tried the xkboptions but am going to soon.
I have run into a few problems when trying to autoload .Xmodmap approach. (the http://wiki.xfce.org/faq mentions issues here too).
Each time I login I have to run

  $ xmodmap ~/.Xmodmap

Otherwise, my current .Xmodmap file works and maps my Super keys to Control keys and my Caps Lock to a control key. I am using a Macintosh keyboard that has the Super Keys, hence my desire to remap:

!.Xmodmap 
! Bindings to work with my Goldtouch mac keyboard
clear mod4

! remap the caps lock to a control
clear Lock
keycode 66 = Control_L

keycode 133 = Control_L
add Control = Control_L

keycode 134 = Control_R
add Control = Control_R

Offline

#9 2014-01-11 19:19:16

slackz
Member
Registered: 2014-01-11
Posts: 1

Re: [Solved] How to set usual Xkb options? (e.g. CapsAsCtrl)

For much more info on the available xkbmap options, see the man page for "xkeyboard-config"

I was searching around for quite a while for a way to properly switch "alt" and "command" keys on my mac keyboard so readline, emacs, etc. feel natural (the way it does on a normal PC keyboard)
The following option was very useful:
-option altwin:swap_lalt_lwin

Offline

Board footer

Powered by FluxBB