3

After many years of working with Ubuntu, I finally installed Ubuntu Mate desktop as I was recommended.

At the moment I cannot manage to active the following keyboard shortcuts, which were very useful for me till now:

  • Take a selected-area screenshot:
    The shift+ImpPt (PrtScn) combination opens a 'take screenshot' pop-up which allows me to perform this action.
    However, I used to have a shortcut which opened directly the area screenshot cursor, now with this combination I have to perform another step.

  • Change keyboard layout:
    In System->Preferences->Hardware->keyboard, under the layout tab, I found the "Options..." button than has inside the item "Switching to another layout". I tried a couple of combinations but it doesn't work for me (Alt+Shift, Ctrl+Shift, ...).
    Just to be clear, I am lookign for a shortcut that will toggle between 3 different layouts I have.

============= Edit ===========
More information:

$ cat /etc/default/keyboard 
XKBLAYOUT=es,gb,il
XKBVARIANT=,,
BACKSPACE=guess
$ dpkg -l | grep ibus
ii  gir1.2-ibus-1.0:amd64                         1.5.22-2ubuntu2.1                     amd64        Intelligent Input Bus - introspection data
ii  ibus                                          1.5.22-2ubuntu2.1                     amd64        Intelligent Input Bus - core
ii  ibus-data                                     1.5.22-2ubuntu2.1                     all          Intelligent Input Bus - data files
ii  ibus-gtk:amd64                                1.5.22-2ubuntu2.1                     amd64        Intelligent Input Bus - GTK2 support
ii  ibus-gtk3:amd64                               1.5.22-2ubuntu2.1                     amd64        Intelligent Input Bus - GTK3 support
ii  ibus-table                                    1.9.25-1                              all          table engine for IBus
ii  libgusb2:amd64                                0.3.4-0.1                             amd64        GLib wrapper around libusb1
ii  libibus-1.0-5:amd64                           1.5.22-2ubuntu2.1                     amd64        Intelligent Input Bus - shared library
ii  libusageenvironment3:amd64                    2020.01.19-1build1                    amd64        multimedia RTSP streaming library (UsageEnvironment classes)
ii  libusb-1.0-0:amd64                            2:1.0.23-2build1                      amd64        userspace USB programming library
ii  libusbmuxd6:amd64                             2.0.1-2                               amd64        USB multiplexor daemon for iPhone and iPod Touch devices - library
ii  python3-ibus-1.0                              1.5.22-2ubuntu2.1                     all          Intelligent Input Bus - introspection overrides for Python (Python 3)
$ gsettings list-recursively | grep xkb
org.mate.peripherals-keyboard-xkb.general default-group -1
org.mate.peripherals-keyboard-xkb.general known-file-list @as []
org.mate.peripherals-keyboard-xkb.general disable-sysconfig-changed-warning false
org.mate.peripherals-keyboard-xkb.general update-handlers @as []
org.mate.peripherals-keyboard-xkb.general group-per-window true
org.mate.peripherals-keyboard-xkb.general duplicate-leds false
org.mate.peripherals-keyboard-xkb.general disable-indicator false
org.mate.peripherals-keyboard-xkb.general layout-names-as-group-names true
org.mate.peripherals-keyboard-xkb.general load-extra-items false
org.mate.peripherals-keyboard-xkb.general handle-indicators false
org.gnome.desktop.input-sources xkb-options @as []
org.gnome.desktop.input-sources sources [('xkb', 'es'), ('xkb', 'gb'), ('xkb', 'il')]
org.mate.peripherals-keyboard-xkb.kbd layouts @as []
org.mate.peripherals-keyboard-xkb.kbd options @as []
org.mate.peripherals-keyboard-xkb.kbd model ''
org.freedesktop.ibus.panel xkb-icon-rgba '#415099'
org.mate.peripherals-keyboard-xkb.indicator show-flags false
org.mate.peripherals-keyboard-xkb.indicator background-color ''
org.mate.peripherals-keyboard-xkb.indicator font-family ''
org.mate.peripherals-keyboard-xkb.indicator foreground-color ''
org.mate.peripherals-keyboard-xkb.indicator secondary 0
org.mate.peripherals-keyboard-xkb.preview width -1
org.mate.peripherals-keyboard-xkb.preview y -1
org.mate.peripherals-keyboard-xkb.preview height -1
org.mate.peripherals-keyboard-xkb.preview x -1
org.freedesktop.ibus.general xkb-latin-layouts ['ara', 'bg', 'cz', 'dev', 'gr', 'gur', 'in', 'jp(kana)', 'mal', 'mkd', 'ru', 'ua']
org.freedesktop.ibus.general preload-engines ['xkb:es::spa', 'xkb:us::eng', 'xkb:il::heb']
org.freedesktop.ibus.general engines-order ['xkb:es::spa', 'xkb:il::heb', 'xkb:us::eng']
guyaloni
  • 441
  • What do you mean by "I cannot manage the following keyboard shortcuts"? What do you mean by "direct shortcut"? Are you trying to set Ctrl+Shift as keyboard layout switch? Have you consulted with https://guide.ubuntu-mate.org/#page-shortcuts about shortcuts? – N0rbert Dec 08 '21 at 19:45
  • Just edited my question, hope now it is clear. – guyaloni Dec 08 '21 at 20:18
  • Please add the output of cat /etc/default/keyboard ; dpkg -l | grep ibus and gsettings list-recursively | grep xkb to the question. – N0rbert Dec 08 '21 at 21:07
  • @N0rbert, just added the information you asked. – guyaloni Dec 09 '21 at 17:34

1 Answers1

3

To disable interactive area screenshot you have to edit the command which executes on Shift+PrintScreen by using command below:

gsettings set org.mate.Marco.keybinding-commands command-2 "/bin/sh -c 'sleep .1;mate-screenshot --area'"

Reverting to defaults is possible by

gsettings set org.mate.Marco.keybinding-commands command-2 "mate-screenshot --area --interactive"

If you do not want to change the command for Shift+PrintScreen, add your own custom keyboard shortcut for custom /bin/sh -c 'sleep .1;mate-screenshot --area' command from Keyboard Shortcuts (or run mate-keybinding-properties directly).


Then about keyboard layouts. You have to open MATE Keyboard Preferences from MATE Control Center (or run mate-keyboard-properties directly) and then add keyboard layouts on the Layouts tab, click Options to set Switching to another layout to the needed value like Alt+Shift. This will allow you to switch between keyboard layouts by the specified shortcut in cycle.

Note: if you have a problem with Ctrl+Shift+other_key interference, then you have to add my PPA to the system (see this answer for details).

N0rbert
  • 99,918
  • 1
    I understand that you recommend disabling interactive area screenshot in order to access the default screenshot? In this case, how can I enable it if I want to do it later on? – guyaloni Dec 08 '21 at 22:05
  • 1
    See edit above. – N0rbert Dec 09 '21 at 05:41
  • Thanks @N0rbert, switching layout is solved. Regarding to interactive area screenshot, actually I would like to add a different shortcut for it, but I do no find where to add it in Keyboard Preferences - can you please tell me how to add it? – guyaloni Dec 09 '21 at 18:04
  • BTW, I do have a probelm with Ctrl + Shift combination. I set in the terminal the Reset and Clear shortcut to be Ctrl + Shift + E, and it doesn't work (I get an underlined lowercase e and then what I type is added to it). I added the PPA you mentioned, but still have the same problem... :-( – guyaloni Dec 09 '21 at 18:08
  • 1
    I do not know your current keymap, but on some of them "underlined lowercase" means unicode input. So I would suggest to undo your Ctrl+Shift+E shortcut. "Reset and Clear" on english keyboard layout is easily accessible by Alt+T, L. I would recommend to remember this default shortcut, it is simple. Adding custom keyboard shortcuts is possible from mate-keybinding-properties (MATE Keyboard Shortcuts) - you click Add, specify Name and Command, then add Shortcut for this freshly created line. – N0rbert Dec 10 '21 at 04:20