swap control and caps lock

Please post all general support questions for LXDE here.
Locked
spetey
Posts: 2
Joined: Thu Sep 24, 2020 9:55 pm

swap control and caps lock

Post by spetey »

Hi folks, I'm new to LXDE, via the Raspberry Pi. It looks great!

I will mostly use VNC to connect to my pi via a virtual desktop, but I can't seem to get any options in /etc/default/keyboard to work. I tried

Code: Select all

XKBOPTIONS="ctrl:swapcaps"
but that seems ignored (yes after reboot too). And when I put this in a terminal:

Code: Select all

setxkbmap -option "ctrl:swapcaps"
I get an error like

Code: Select all

Couldn't interpret _XKB_RULES_NAMES property
Any thoughts or help on this? Thanks in advance!
edward
Posts: 146
Joined: Mon Sep 22, 2008 11:01 pm
Location: Boston

Re: swap control and caps lock

Post by edward »

There is a command:

Code: Select all

xmodmap -pk
Reference: https://ictsolved.github.io/remap-key-in-linux/

Also see:

Code: Select all

man xmodmap
Hope this helps.
Debian Sid - LXDE
spetey
Posts: 2
Joined: Thu Sep 24, 2020 9:55 pm

Re: swap control and caps lock

Post by spetey »

Thanks, I'll try it! The method I used seems to work fine for the "real" desktop, when it was connected to a monitor - but not for virtual desktops. I don't get why keyboard mappings depend on the display!
edward
Posts: 146
Joined: Mon Sep 22, 2008 11:01 pm
Location: Boston

Re: swap control and caps lock

Post by edward »

spetey wrote: Sun Sep 27, 2020 6:15 am Thanks, I'll try it! The method I used seems to work fine for the "real" desktop, when it was connected to a monitor - but not for virtual desktops. I don't get why keyboard mappings depend on the display!
That's probably by design. I've never actually used a virtual desktop/machine before.
Debian Sid - LXDE
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: swap control and caps lock

Post by drooly »

spetey wrote: Sun Sep 27, 2020 6:15 amI don't get why keyboard mappings depend on the display!
Well, the keyboard mappings for the display server depend on the display.
The keyboard mappings for the console do not!
The "X" in the application or environment variable name usually denotes that it's relevant to the X server, i.e. the GUI.
You can have a look at e.g. /etc/default/console-setup for non-X stuff.
Locked