Lost ability to remap Caps Lock to Ctrl

Bug #1215826 reported by David Leal on 2013-08-23
688
This bug affects 165 people
Affects Status Importance Assigned to Milestone
Indicator keyboard
Confirmed
Medium
Unassigned
indicator-keyboard (Ubuntu)
Medium
Unassigned

Bug Description

After the last update (today) I am no longer able to remap Caps Lock to Ctrl. I tried to set XKBOPTIONS in /etc/default/keyboard but that only seems to work for a few brief seconds. The same happens if I invoke "setxkbmap -option ctrl:nocaps" on the console. It works for a few seconds, then Caps Lock reverts to its Caps Lock-y behavior.

----------
For other layout switching problems introduced in Ubuntu 13.10 you can see bug 1218322.
----------

David Leal (dgleal) wrote :

I'd like to associate this with Ubuntu 13.10, but unfortunately I can't see how. Sorry about that.

affects: gnome-settings-daemon (Ubuntu) → ubuntu
tags: added: saucy
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Ivan Borzenkov (ivan1986) wrote :

it's begin after install Indicator keyboard
#1215801

David Leal (dgleal) wrote :

Some additional information: I mentioned that the functionality seems to work for a few brief seconds, but actually it appears that the change is triggered the first time (or few times) you press caps lock. It works, and then reverts to the normal Caps Lock function.

David Leal (dgleal) wrote :

Sorry about the spam everyone. I can confirm that uninstalling indicator-keyboard fixes the problem for me.

affects: ubuntu → indicator-keyboard (Ubuntu)
Nikolay Hodyunya (nkhodyunya) wrote :

This bug also affects me on my 2 machines. My Caps Lock behaviour is broken(sometimes it act like a Compose key as I configured, sometimes it just work as usual Caps Lock), but what's more important is that I can't switch keyboard layout with any keyboard shortcut i assign. I've tried to uninstall indicator-keyboard, but this not only didn't help me, but also broke Region & Language from System Settings application.

David Leal (dgleal) wrote :

Nikolay, I believe there is a way to turn the layout switching back on. You need to go to System Settings -> Keyboard -> Shortcuts -> Typing, then change the accelerators for "Switch to next source" and "Switch to previous source".

Nikolay Hodyunya (nkhodyunya) wrote :

David, this was the first thing I've tried to do, but it didn't help.

Dmitry (damalinov) wrote :

I cannot solve this issue by uninstalling indicator-keyboard.

I think, it is not the problem in indicator-keyboard, because there were changes in keyboard settings menu. Earlier, i had many options - http://xbb.uz/files/illustrations/soft/os/ubuntu/12.10-layout1.jpg
But now i have only 2 shortcuts - http://ctrlv.in/228499

And it is quite strange.

David Leal (dgleal) wrote :

Dmitry, I did 2 things to try to make this work, but I'm not sure which one helped (thought uninstalling indicator-keyboard clearly was one of them):

1. Using dconf-editor, change org.gnome.desktop.input-sources.xkb-options to ['ctrl:nocaps']
2. Add `XKBOPTIONS="ctrl:nocaps"` to `/etc/default/keyboard` then run `sudo dpkg-reconfigure -phigh console-setup`, as indicated here: http://www.noah.org/wiki/CapsLock_Remap_Howto

MTelegin (maximtel) wrote :

I cannot map layout switching to any shortcuts except Left Shift + Backspace. I use english and russian layouts.

lendis (zakirovr90) wrote :

maximtel, same thing to me. And thanks for find out, at least, this shortcut.

lendis (zakirovr90) wrote :

David Leal, works second thing

If anyone cannot set CapsLock or Ctrl-Shift etc. as keyboard switch modifier, look at input-sources-switcher key at the org.gnome.settings-daemon.peripherals.keyboard in dconf-editor.

lendis (zakirovr90) wrote :

Oleksandr Senkovych, thank you, it's work

lendis (zakirovr90) wrote :

And anyone knows where the all settings of keyboards which used to be. Like, "Change Caps Lock behavior" and others

vladk (vladkonan) wrote :

Very very annoying bug

for me fastest way to fix it is from console type:
gsettings set org.gnome.settings-daemon.peripherals.keyboard input-sources-switcher ctrl-shift

ctrl-shift can be changed to alt-shift, etc..

MTelegin (maximtel) wrote :

vladk, unfortunately it stops to work after reboot.

Chris Morgan (chris.morgan) wrote :

My experience after the first few minutes, where it was in flux, sometimes operating as Caps_Lock and sometimes as BackSpace, was that it settled down to acting as BackSpace (as configured) but would not repeat—viz., holding backspace deleted many characters, while holding caps lock deleted only one character.

I've found that using xmodmap to remap the caps lock key's keycode to BackSpace works to make it repeat correctly.

For me, the Caps Lock key is keycode 66; I believe this may vary from machine to machine. If that be so, you can find out what it is for you with ``xev`` (run it, press the caps lock key, look for the keycode part).

    xmodmap -e 'keycode 66 = BackSpace'

I believe that putting the "keycode 66 = BackSpace" line in ~/.Xmodmap is supposed to fix it automatically on login; I don't know as I haven't closed my session since applying this fix. If not, I guess it could go somewhere else. (Something which would be executed at X startup time?)

Ivan Borzenkov (ivan1986) wrote :

after last update broken
gsettings set org.gnome.settings-daemon.peripherals.keyboard input-sources-switcher ctrl-shift
variant

David Leal (dgleal) wrote :

I don't think this is actually a duplicate. The problem here is that indicator-keyboard, for some reason, is resetting all the mapping settings, so that, if I don't have indicator-keyboard running, I can use Caps Lock as Ctrl, if I do, I can't.

MTelegin (maximtel) wrote :

No matter how I achieve layout switch, I have broken shortcuts in Google Chrome and other programs in Russian layout. So I decided to downgrade to 13.04. I hope this bug will be fixed in upcoming 13.10 release.

Gleb Stiblo (errandir) wrote :

confirm, if i remove indicator-keyboard, and execute 'setxkbmap' with params, then CapsLock layout switch works fine.

Timofey Gorshkov (tvgorshkov) wrote :

Also it is impossible to set «Alt+Shift» shortcut at «Text Entry Settings -> Switch to next source using:».

Rörd Hinrichsen (roerdhh) wrote :

I was affected by the same problem and can confirm that removing indicator-keyboard fixes the problem, sadly sacrificing visual feedback about the current keymap though.

My entries at GSettings key org.gnome.desktop.input-sources.xkb-options were not lost during the update to 13.10 and started working again after removing the package. Besides 'ctrl:nocaps', I had also set 'grp:shifts_toggle', i.e. using pressing both shift keys together to toggle keymaps, and that shortcut was also restored by this.

Bug confirmed on a default install of Saucy Salamander. Removing indicator keyboard fixed it.
I have posted a simple test using xmodmap here: http://ubuntuforums.org/showthread.php?t=2181366

Bo (kbo-home) on 2013-10-17
Changed in indicator-keyboard:
status: New → Confirmed
status: Confirmed → New
ryou ezoe (boostcpp) wrote :

This issue also affect me.
I mapped Ctrl to Caps Lock in 13.04.
After the upgrade to13.10, I can't find the same UI.
But the mapping are in effect.

So I lost the GUI way to change back the previous settings.

Igor (igor-iurkov) wrote :

Got same problem with keyboards-indicator after last update.

I mapped Alt+Shit in 13.04 to change keyboard layout, but after last update (13.10) it only works when second language in keyboard indicator is active, if active first language (EN) it doenst work.

Nikolay Shopik (nshopik) wrote :

I believe problem lies that it actually change layout but not input language.

if you have selected primary language you can't switch it unless manually set it via mouse in indicator-keyboard or use keyboard shortcut "select previous layout"

So here is how it works right now, my main shortcut "next layout" - R SHIFT and R SHIFT + L SHIFT - "previous layout".

After pressing both shifts I can switch my input language just fine with just R SHIFT and if I press both shifts again, it will stop working.

Why I think it change layout but not input language? If I press both shifts and press "." - dot on numpad it enters "," on both languages, while should do this on Russian keyboard only. Pressing again "previous layout", will give me English keyboard and I can't change input language with just SHIFT (next layout), but it correctly enter "." on numpad when I press it.

Changed in indicator-keyboard (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Changed in indicator-keyboard:
status: New → Confirmed
Aleksandr Chepurnoy (wuron) wrote :

When I was using 13.04, I had CapsLock for layout change. In 13.10 I changed it to ctrl+space, since CapsLock was not available.
Now I have ctrl+space for switching between [English, Russian, Ukrainian] AND CapsLock for switching between [Currently active in indicator, English]. So if I choose Russian in indicator, I can press CapsLock to switch English/Russian (but the change is not reflected in indicator). If I choose English, nothing happens when I press CapsLock (or maybe it switches to "another" English)

This is even more confusing after locking (ctrl+alt+L) session. Consider the use-case:
1. I choose Russian in indicator (either with mouse or pressing ctrl+space)
2. I press CapsLock, so I’m now using English while indicator still shows Russian
3. I press ctrl+alt+L, to lock session, so now I see a password field (with asterisks, of course), and another language indicator (to the right from the password field)
4. Now I cannot switch using ctrl+space. I can switch using CapsLock but only between Russian (since it was active in indicator before) and English, and I have no idea about what my current layout really is :)

Norbert (nrbrtx) wrote :

This bug is very important, please fix it.

Changed in indicator-keyboard (Ubuntu):
status: Triaged → Confirmed

Please, avoid changing status without being clear why you choose to do so.

Changed in indicator-keyboard (Ubuntu):
status: Confirmed → Triaged

I have 4 keyboard layouts set up: English (us), Russian, Japanese (anthy) and tegaki
first of all, in "Region and Language settings" there are some shortcuts options
"Switch to next source" is set to ctrl+space, but it seems to do nothing
(btw, these shortcut was used to activate ibus/anthy before)

Somehow, though, alt+shift combinations is changing icon on the indicator.
when I switch from English to anthy - anthy is indeed activated and I can type in Japanese
when I switch to Russian - icon is set to Russian but input is English again
when I switch to tegaki (hand-written japanese input) - the panel for drawing does not come up

Narek M.B. (narekm) wrote :

This only happens when the keyboard layout is changed. I use xmodmap to remap and I noticed that once xmodmap is called the remapping works, however as soon as you switch to another window the remapping is lost. I went into layout settings and unchecked the box "Allow different sources for each window". The result: xmodmap settings persist till layout is changed.

Not really a workaround, but might be helpful nonetheless.

Norbert (nrbrtx) on 2013-10-29
description: updated
Norbert (nrbrtx) on 2013-10-31
tags: added: keyboard-layout-switching-related
Sebastien Bacher (seb128) wrote :

Thank you for the bug report/comments. Could the users having the issue explain in details what they are trying to do, how, and what is not working?

E.g
"- install Ubuntu 13.10
- go to the keyboard settings
- configure <key> by clicking on <UI>
- try to do <thing you try to do>

what should happen: should do <something>
what happens: <something> is happening"

Changed in indicator-keyboard:
importance: Undecided → Medium
status: Confirmed → Incomplete
Changed in indicator-keyboard (Ubuntu):
status: Triaged → Incomplete
Justyn Butler (justyn) wrote :

In response to #35.
- Install Ubuntu 13.10
- Go to keyboard layout settings
- Find 'CapsLock Key Behavior' and set to eg "Make CapsLock an additional ctrl" or "Make CapsLock an additional backspace".

The last point worked for years, up until Ubuntu 13.10. The option to set CapsLock key behaviour is no longer there, and there appears to be no replacement.

For users who set the CapsLock behaviour to something more useful to reduce RSI (to backspace in my case) this is a problem.

Changed in indicator-keyboard (Ubuntu):
status: Incomplete → Confirmed
Changed in indicator-keyboard:
status: Incomplete → Confirmed
Changed in indicator-keyboard (Ubuntu):
status: Confirmed → Triaged
yufw (yynyygy) wrote :

The real problem is not that the GUI option is missing, it is that I can' t even use xmodmap to map Caps Lock to Ctrl because it reverts to its default behavior after a few seconds.

Jimmy Jackson (crj747) wrote :

I am having the same issue. Recently went to all the work of getting Ubuntu installed on a Macbook via USB stick and now the "Change Capslock Behavior" in Keyboard Options GUI is completely gone. I guess I should I have gone with 12? Took a ton of work and trackpad is half-functional now. How/why was this menu completely removed? It was very helpful; found on OSX as well.

Have tried several command-line options from around the web but none of them seem to work. The best I can get is disabling Caps Lock, but not remapping it.

Can't Canonical simply make a package that adds this option back to the keyboard options menu/gui?

Norbert (nrbrtx) wrote :

@Jimmy
IMHO It seems that GNOME developers are going to make the most simple/stupid desktop environment today and in near future.
They removed all options from "Keyboard Layout Options" window (it was under gnome-control-center keyboard in Ubuntu 12.04). They think that gnome-tweak-tool is a good place for them. But gnome-tweak-tool is not preinstalled by default.

You can report separate bug to GNOME bugzilla or add a comment to existing bug reports - https://bugzilla.gnome.org/show_bug.cgi?id=711426 , https://bugzilla.gnome.org/show_bug.cgi?id=712165 . I hope as GNOME users we can change the situation.

Koji (koji.yk) wrote :

Thank you Norbert for the information.

It worked for me as a workaround in the Ubuntu desktop by Installing gnome-tweak-tool and modifying the ctrl key position.

A. Eibach (andi3) wrote :

Thank you Chris (comment 19) and Norbert (comment 39)!
This also solved MY problem.

While gnome-tweak-tool didn't make me able to set Caps Lock as Compose key (Sun Sparc Workstation style), xmodmap did the trick!

putting

keycode 66 = Multi_key

in my .Xmodmap will now finally let me use the ever-useless Caps Lock key as Compose key!!

Unfortunately the GUI tool(s) to accomplish this in Lubuntu Saucy here are currently broken beyond repair...so thanks.

toolib (toolib) wrote :

Thanks Norbert, it save my day!

tags: added: keyboard-layout-switching-hotkeys
removed: keyboard-layout-switching-related
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers