3

For years now on Ubuntu-derivatives (right now on 12.04 derivative), I've been able to type all-caps holding the Shift key while typing, not having to remove it for when I need to hit Space.

For the last week or so, though, Shift+Space doesn't do anything, breaking my typing.

How can I get Shift+Space to insert a normal Space as was the functionality for years?

I'm using a Bluetooth Apple Wireless Keyboard in Dvorak layout on Elementary Luna. I have tested it on my laptop's main keyboard and the problem is still present, and I've noticed that this problem is present on other machines running Elementary Luna.

Here's output of xev trying the key combination:

Outer window is 0x6600001, inner window is 0x6600002

PropertyNotify event, serial 8, synthetic NO, window 0x6600001,
    atom 0x27 (WM_NAME), time 1502279833, state PropertyNewValue

PropertyNotify event, serial 9, synthetic NO, window 0x6600001,
    atom 0x22 (WM_COMMAND), time 1502279833, state PropertyNewValue

PropertyNotify event, serial 10, synthetic NO, window 0x6600001,
    atom 0x28 (WM_NORMAL_HINTS), time 1502279833, state PropertyNewValue

CreateNotify event, serial 11, synthetic NO, window 0x6600001,
    parent 0x6600001, window 0x6600002, (10,10), width 50, height 50
border_width 4, override NO

PropertyNotify event, serial 14, synthetic NO, window 0x6600001,
    atom 0x15b (WM_PROTOCOLS), time 1502279834, state PropertyNewValue

MapNotify event, serial 15, synthetic NO, window 0x6600001,
    event 0x6600001, window 0x6600002, override NO

ConfigureNotify event, serial 23, synthetic NO, window 0x6600001,
    event 0x6600001, window 0x6600001, (0,0), width 178, height 178,
    border_width 0, above 0x6400003, override NO

PropertyNotify event, serial 23, synthetic NO, window 0x6600001,
    atom 0x1f1 (_NET_WM_ALLOWED_ACTIONS), time 1502279847, state PropertyNewValue

ReparentNotify event, serial 23, synthetic NO, window 0x6600001,
    event 0x6600001, window 0x6600001, parent 0xf4517d,
    (0,0), override NO

PropertyNotify event, serial 23, synthetic NO, window 0x6600001,
    atom 0x163 (_NET_WM_DESKTOP), time 1502279850, state PropertyNewValue

PropertyNotify event, serial 23, synthetic NO, window 0x6600001,
    atom 0x163 (_NET_WM_DESKTOP), time 1502279850, state PropertyNewValue

PropertyNotify event, serial 23, synthetic NO, window 0x6600001,
    atom 0x160 (_NET_FRAME_EXTENTS), time 1502279850, state PropertyNewValue

ConfigureNotify event, serial 23, synthetic NO, window 0x6600001,
    event 0x6600001, window 0x6600001, (10,30), width 178, height 178,
    border_width 0, above 0x0, override NO

PropertyNotify event, serial 23, synthetic NO, window 0x6600001,
    atom 0x18e (WM_STATE), time 1502279850, state PropertyNewValue

PropertyNotify event, serial 23, synthetic NO, window 0x6600001,
    atom 0x169 (_NET_WM_STATE), time 1502279850, state PropertyNewValue

ConfigureNotify event, serial 23, synthetic YES, window 0x6600001,
    event 0x6600001, window 0x6600001, (-1,66), width 178, height 178,
    border_width 2, above 0x0, override NO

MapNotify event, serial 23, synthetic NO, window 0x6600001,
    event 0x6600001, window 0x6600001, override NO

VisibilityNotify event, serial 23, synthetic NO, window 0x6600001,
    state VisibilityUnobscured

Expose event, serial 23, synthetic NO, window 0x6600001,
    (0,0), width 178, height 10, count 3

Expose event, serial 23, synthetic NO, window 0x6600001,
    (0,10), width 10, height 58, count 2

Expose event, serial 23, synthetic NO, window 0x6600001,
    (68,10), width 110, height 58, count 1

Expose event, serial 23, synthetic NO, window 0x6600001,
    (0,68), width 178, height 110, count 0

PropertyNotify event, serial 23, synthetic NO, window 0x6600001,
    atom 0x169 (_NET_WM_STATE), time 1502279855, state PropertyNewValue

FocusIn event, serial 23, synthetic NO, window 0x6600001,
    mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 23, synthetic NO, window 0x0,
    keys:  4294967265 0   0   0   16  0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

PropertyNotify event, serial 23, synthetic NO, window 0x6600001,
    atom 0x169 (_NET_WM_STATE), time 1502279855, state PropertyNewValue

PropertyNotify event, serial 23, synthetic NO, window 0x6600001,
    atom 0x196 (XKLAVIER_STATE), time 1502279857, state PropertyNewValue

KeyRelease event, serial 28, synthetic NO, window 0x6600001,
    root 0xed, subw 0x0, time 1502279871, (1355,447), root:(1356,515),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
    XLookupString gives 1 bytes: (0d) ""
    XFilterEvent returns: False

PropertyNotify event, serial 28, synthetic NO, window 0x6600001,
    atom 0x169 (_NET_WM_STATE), time 1502279881, state PropertyNewValue

PropertyNotify event, serial 32, synthetic NO, window 0x6600001,
    atom 0x1ea (_NET_WM_ICON_GEOMETRY), time 1502279914, state PropertyNewValue

KeyPress event, serial 33, synthetic NO, window 0x6600001,
    root 0xed, subw 0x0, time 1502281345, (1355,447), root:(1356,515),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x6600001,
    root 0xed, subw 0x0, time 1502281545, (1355,447), root:(1356,515),
    state 0x1, keycode 65 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x6600001,
    root 0xed, subw 0x0, time 1502281632, (1355,447), root:(1356,515),
    state 0x1, keycode 65 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x6600001,
    root 0xed, subw 0x0, time 1502281770, (1355,447), root:(1356,515),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 33, synthetic NO, window 0x6600001,
    mode NotifyNormal, detail NotifyNonlinear

PropertyNotify event, serial 33, synthetic NO, window 0x6600001,
    atom 0x169 (_NET_WM_STATE), time 1502285447, state PropertyNewValue

Interestingly enough, Caps Lock also triggers the problem. When Caps Lock is engaged, Space does nothing.

  • Does it behave the same way with other keyboards? Which distribution are you actually using? Which derivative? – terdon Nov 6 '14 at 19:43
  • On my main laptop keyboard, problem is still present. I've noticed this on my other computers running Luna also. – Naftuli Kay Nov 6 '14 at 19:44
  • 1
    Could Shift+Space be bound to a particular action in your desktop environment? That might be what's causing the issue. – terdon Nov 6 '14 at 19:45
  • 2
    it sounds like something specific to the gala desktop. I'm afraid I don't know enough about it to help but I would certainly check whether there are any shortcuts mapped to SHift+Space. On a gnome-based desktop, you can do this with gsettings list-recursively org.gnome.desktop.wm.keybindings | grep space | grep Shift. Perhaps you know how to port that to gala. – terdon Nov 6 '14 at 19:51
  • 1
    Run xev from the terminal and type Shift+Space in the xev window. Each key press and key release event (and a number of other events) will be logged in the terminal. Is there a KeyPress event from pressing Space? If so, copy-paste it into your question. – Gilles Nov 7 '14 at 2:03
1
+50

xmodmap and xev

You could use xmodmap to dump or modify keyboard mapping:

xmodmap -pke | grep space
keycode  65 = space NoSymbol space

You could use xev to watch about keyboard events

xev

You could try to modify you keyboard mapping:

 xmodmap -e 'keycode 65 = space space space space'

This may work, but warn! Playing with xmodmap could place you into bad situation! Try this immediately after login and prepare yourself to force ending your session (and/or read the fine manual).

Using xmodmap in this way won't store your config between X-sessions. I.E. you have to issue same command each time you log in.

  • When I run xmodmap -pke | grep space: keycode 65 = space NoSymbol space NoSymbol NoSymbol NoSymbol NoSymbol NoSymbol space space thinspace nobreakspace. – Naftuli Kay Nov 25 '14 at 22:27
  • @NaftuliTzviKay Did you try the last command: xmodmap -e 'keycode 65 = space space space space' (or maybe with only one space)? – F. Hauri Nov 26 '14 at 16:54
  • Actually, it appears that something on my machine causes the key to get remapped every so often, breaking Shift+Space again. Any ideas on what could be doing this on my machine? – Naftuli Kay Dec 2 '14 at 2:03
  • Yes, some programs do a keyboard re-mapping when focus switch in or out of them... This happen with remote control apps, like vncviewer or virtual machines like KVM... Some games could make same effects. My solution was to store my keyboard function into a dedicated shell script, which I run simply each times something goes wrong. – F. Hauri Dec 3 '14 at 12:03
0

Okay, so Elementary made decisions again which broke it again.

Go to System Settings:

enter image description here

Go to Keyboard

enter image description here

Go to the "Shortcuts" tab, under "Universal Access" and change the "Next Keyboard Layout" modifier to be something harder to hit, like Ctrl+Alt+Shift+Super+Space, like a boss.

By the way, nothing in "Options" works, so Shift+CapsLock for example won't work, even though it should. Your mileage may vary, but I slayed a mighty dragon today.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.