How to disable Ctrl+Shift+U in Ubuntu Linux?

60

20

ctrl+shift+u is a combined shortcut key in Eclipse.

But when I press it, it shows up a u, just like input with an underline. I guess this shortcut has been declared by Ubuntu, so I can't use it.

I used to solve this problem by typing capslock first. Is there any better method?

Frank Cheng

Posted 2011-11-18T01:12:54.003

Reputation: 703

Answers

48

Found a way to unbind it on Ubuntu 13.10.

Go to Language Support on System Settings and change the Keyboard input method system to none

Then restart the system or just log out and log in.

PutzKipa

Posted 2011-11-18T01:12:54.003

Reputation: 596

In latest Ubuntu versions you just go Language Support then Keyboard input method system is available – Vahid – 2018-05-30T21:26:48.873

19This did not work for me on Ubuntu 18.0.4 LTS. Any ideas why? – Pytry – 2018-06-19T22:05:24.853

doesnt work in 16.04 LTS also – weima – 2018-07-18T15:06:19.590

2why Ubuntu made it so difficult to disable keyboard input system? keystrokes entered going directly to program should be the default anyway. – weima – 2018-07-18T15:08:19.390

7does not work for me on ubuntu 18.04 – iRaS – 2018-08-22T08:59:44.727

@PutzKipa:Please correct the answer. A logout/login is good enough. No need to restart the OS. – Rudy Vissers – 2019-04-15T07:44:43.973

11Just logging out and back in works for me. – Martin – 2014-04-29T10:13:42.097

20

Ubuntu 18.04 Solution

@ShmulikA's answer was close, but unfortunately, selecting "None" did not work for me. I can confirm the process below works in 18.04 as of April 2019.

  1. Open Search using Super key (aka WIN for folks like me)
  2. Type "language support" and hit ENTER

enter image description here

  1. Click the Keyboard input method system dropdown menu and select XIM

enter image description here

  1. Click Close
  2. Reboot

When I logged back in, I was able to set CTRL+SHIFT+U as a shortcut in Visual Studio Code.

Brown

Posted 2011-11-18T01:12:54.003

Reputation: 1 092

3Great, works perfect with Android Studio shortcuts. Thanks a lot. – jbaris – 2019-04-17T11:47:50.363

2worked for me even without applying system-wide. Thanks! – grreeenn – 2019-05-24T12:42:54.237

Good to know, thanks for the feedback. – Brown – 2019-05-24T18:33:39.910

3Worked on Linux Mint. Thanks! I'm finally free again! – André Valenti – 2019-06-13T18:32:04.633

1opening the dialog (1.+2.) can also be done by $> gnome-language-selector – Frank Nocke – 2019-09-11T10:22:05.543

1This unlocks the key binding but messes up some applications. Dconf Editor is very glitchy now and DBeaver became unusable. How hard can it be to disable a fraking shortcut, Ubuntu? – Rafał G. – 2019-10-01T07:58:24.927

4

Try:

export GTK_IM_MODULE="gtk-im-context-simple"

and then run Eclipse from the same shell. Or if that doesn't work,

export GTK_IM_MODULE="xim"

(This test only works entering running the export command and then Eclipse from the same shell command line, it won't change anything if you use a desktop shortcut or the Applications menu, or run Eclipse from a new shell.)

If either test works, you can make the change system-wide by adding it to /etc/environment, or per-user in ~/.gnomerc. (The export command doesn't go in those files, just a new line with GTK_IM_MODULE="xim" or GTK_IM_MODULE="gtk-im-context-simple".)

It sounds like this behavior comes from GTK's input mappings as described here: https://developer.gnome.org/gtk3/unstable/GtkIMContext.html

... This is called preediting, and an input method may provide feedback about this process by displaying the intermediate composition states as preedit text. For instance, the default GTK+ input method implements the input of arbitrary Unicode code points by holding down the Control and Shift keys and then typing “U” followed by the hexadecimal digits of the code point. When releasing the Control and Shift keys, preediting ends and the character is inserted as text. Ctrl+Shift+u20AC for example results in the € sign.

GTK is used by a whole lot of common apps in Ubuntu, including Eclipse.

Steven K

Posted 2011-11-18T01:12:54.003

Reputation: 323

4

Ubuntu 18.04

Running into this problem on Ubuntu 18.04, I've tried all suggestion above, but unfortunately none of them worked. I ended up uninstalling the ibus package.

Background / sidenotes

I tried to disable IBus using

  1. the Language Support menu
  2. im-config (configures ~/.xinputrc)
  3. sudo im-config (configures /etc/X11/xinit/xinputrc)

I noticed however that no matter what config I tried, the ibus daemon was running everytime after I had rebooted.

jbvo

Posted 2011-11-18T01:12:54.003

Reputation: 41

I think it is the best solution. Remove it and forget about that keymaps issues in Intellij – Vitalii Diravka – 2019-06-04T15:05:46.173

I ended up uninstalling the ibus package. – on my Ubuntu 18.04.3 the ibus package wasn't installed in the first place (I could not run ibus-setup for example, until I installed the package), yet I had a working Emoji-Editor (to my dismay, presseing ctrl-. in Pluma for example) and the ctrl-shift-E issue. – Frank Nocke – 2019-09-10T16:42:39.930

4

Changing the input method as PutzKipa explains actually fixes the problem.

However, I've failed to find any configuration panel under KDE ubuntu 14.04 to do the job, and the standard im-config utility seems broken. I finally succeeded by creating a file ~/.xinputrc that contains a single line:

run_im xim

then logout/login. This chooses xim as the input method (ibus is the default). If you remove your ~/.xinputrc, then im-config can list the input methods available, even if it fails to select one.

Champignac

Posted 2011-11-18T01:12:54.003

Reputation: 141

1this also doesnt seem to work in 16.04 LTS – weima – 2018-07-18T15:10:30.183

3

Ubuntu 14.04/18.04 Solution

recently upgrade to 18.04 and fight my way to solve this issue.

  1. open search using super key
  2. go to language support
  3. click Keyboard input method system dropdown menu and choose none

Language Support Menu

  1. dont forget to click - apply system wide
  2. close the window (wont activate until you do)
  3. reboot (logout might be enough)

Credit goes to reverse issue on askubuntu - for some reason someone wants to enable this shortcut.

ShmulikA

Posted 2011-11-18T01:12:54.003

Reputation: 139

1This solution did not work for me. Should I also reboot? (I have too many windows opened now and cannot test it quickly) – desa – 2018-09-30T11:58:17.887

works after reboot (maybe logout is enough) @desa thanks ill update the answer – ShmulikA – 2018-10-02T11:21:06.903

3does not solve the problem in 18.04 – James – 2018-11-21T14:55:48.503

1This solution does not work in 18.04, even after a reboot. @ShmulikA, are you sure that's all you had to do? Was there another step? Followed your steps exactly, no luck. – Brown – 2019-04-05T16:53:36.033

3

I use Ubuntu 18.10 and had trouble in a particular app (Intellij Idea).

In this askUbuntu answer, Kayvan Tehrani shows a setting that works for me in that setting. Set the XMODIFIERS to an empty string before running your application:

export XMODIFIERS=""
myapp.sh

In my case, myapp.sh was idea.sh, and I added the line inside the file:

#!/bin/sh
#
# ---------------------------------------------------------------------
# IntelliJ IDEA startup script.
# ---------------------------------------------------------------------
#
export XMODIFIERS=""
...

This way, my desktop shortcut still works.

XMODIFIERS apparently changes the way xim and ibus works, and when it's cleared, it disables the CTRL-SHIFT-U combo, allowing it to filter into the current app.

Thomas

Posted 2011-11-18T01:12:54.003

Reputation: 41

The broken Ctrl-Shift-U behaviour has been bugging me for almost 2 years now, and your solution is the only one I have tried that works. – Dave Cole – 2019-05-22T23:49:32.933

2

For Ubuntu 18.04.

I struggled with this problem for two days. I tried all the methods listed here earlier. And it looks like I came up with a solution. But it is very unstable and has bugs.

The basic idea is this: in the system settings you can specify the command that is started by the Ctrl+Shift+U key combination.

Note: if you specify false as the command, the combination will not work at all.

However, we can specify the path to the script as the command, in which we will simulate pressing the same key combination.

To simulate keystrokes, I tried the xdotool (apt install xdotool) and the xte (apt install xautomation). Both options were unstable. However, xte turned out to be more flexible for me.

Example with xte

  • Create a file /home/username/shortcut.sh
  • Add permission to execute: chmod u+x /home/username/shortcut.sh
  • Specify the path to the script as a command for the Ctrl+Shift+U key combination in the keyboard settings

Here is an example script:

#!/bin/sh
# Make a small delay in order to have time to release the keys.
sleep 0.2

# Simulate the release of just pressed keys, if they are still pressed.
xte 'keyup u' 'keyup Shift_L' 'keyup Control_L'

# Hack: Caps_Lock is used so that the system does not intercept this combination.
# You can try to remove it if it hinders you.
xte 'key Caps_Lock'

# Simulate pressing a key combination
xte 'keydown Shift_L' 'keydown Control_L' 'key u'

# Simulate releasing a key combination
xte 'keyup Shift_L' 'keyup Control_L'

# Restore Caps_Lock to the previous state.
xte 'key Caps_Lock'

I tested this in PhpStorm 2018.2 EAP Build #PS-182.3458.35 and I can say that it works, but with some caveats:

  • this works slowly (on my rather old PC)
  • during the execution of the script, it is better not to press any keys
  • sometimes it may not work
  • sometimes it can enter an infinite loop. Therefore, it's better to add a check to the script that the script is already running.

In general, if you do not often use this combination, then this solution may suit you.

But, probably, someone will come up with a better and more stable solution.

I hope this idea will help someone.

Vadim

Posted 2011-11-18T01:12:54.003

Reputation: 51

2

  1. Run ibus-setup from the terminal (or open IBus Preferences).
  2. Go to “Emoji”.
  3. Next to “Unicode code point:”, click on the three dots (i.e. ...).
  4. In the dialog, click “Delete”, then “OK”.
  5. Close the IBus Preferences window.

kleinfreund

Posted 2011-11-18T01:12:54.003

Reputation: 295

Wow! Thank you kleinfreund, this solution is the best way to fix the issue. Much better than changing "Keyboard input method system". – Pavel Prischepa – 2019-11-06T08:35:19.397