Skip to content

Prevents caribou from appearing when you use a touchscreen with the on screen keyboard disabled in gnome-shell 3.36

License

Notifications You must be signed in to change notification settings

lxylxy123456/cariboublocker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cariboublocker for GNOME Shell 3.36 (and above)

Available at: https://extensions.gnome.org/extension/3222/block-caribou-36/

Based on https://github.com/keringar/cariboublocker.

Change some naming to be compatible with GNOME Shell 3.36.

There are some naming changes in GNOME Shell, so the original project by keringar no longer works on some GNOME Shell versions (For me, it works on Fedora 31 with gnome-shell-3.34.5 and Xorg, but not on Fedora 32 with gnome-shell-3.36.3 and Xorg).

Install

Install this extension using one of the following ways. If your GNOME Shell version is higher than this extension is configured to support, you can still try this extension following Installing on high GNOME Shell version below.

Update for GNOME Shell 44 (Fedora 38): it looks like you need to restart GNOME Shell after enabling or disabling this extension.

Way 1: use extensions.gnome.org

This extension is available at the official GNOME Shell Extensions website: https://extensions.gnome.org/extension/3222/block-caribou-36/

Way 2: download zip

Go to Releases, and choose the zip file corresponding to your gnome-shell version. Then gnome-extensions install <your-gnome-shell-version>.zip.

Installing on high GNOME Shell version

This extension is likely to work for a high GNOME Shell version, if GNOME Shell's keyboard.js is not changed. This extension specifies a number of supported GNOME Shell versions in metadata.json. If your GNOME Shell version is not in this list, you may not be able to install this extension.

There are a few possible solutions:

  1. In dconf, set disable-extension-version-validation (in /org/gnome/shell/) to True. See https://gjs.guide/extensions/overview/anatomy.html#shell-version.
  2. Download this extension as a zip file, from either extensions.gnome.org or GitHub. Then add your GNOME Shell version number to metadata.json in the list specified by "shell-version".
  3. Wait for the extension maintainer (currently lxylxy123456) to update the extension. Maybe notifying the maintainer on extensions.gnome.org or GitHub can help.

Test Log

  • 13 Jun 2020: 3.36.3 PASS on Fedora 32 with gnome-shell-3.36.3 and Xorg
  • 20 Feb 2021: 3.36.3 PASS on Fedora 33 with gnome-shell-3.38.4 and Xorg
  • 29 Apr 2021: 40.0 PASS on Fedora 34 with gnome-shell-40.0 and Xorg
  • 5 Dec 2021: 41 PASS on Fedora 35 with gnome-shell-41.1 and Xorg
  • 12 Jun 2022: 42 PASS on Fedora 36 with gnome-shell-42.2 and Xorg
  • 12 Dec 2022: 43 PASS on Fedora 37 with gnome-shell-43.1 and Xorg
  • 4 Jun 2023: 44 PASS on Fedora 38 with gnome-shell-44.0 and Xorg
  • 7 Nov 2023: 45 PASS on Fedora 39 with gnome-shell-45.0 and Xorg

Change Log

  • Replace Keyboard with KeyboardManager in extensions.js.
  • Simply change "shell-version" in metadata.json to 40.0. For some reason the version string "3.36.3" still works on Fedora 33's gnome-shell-3.38.
  • Update shell-version in metadata.json
  • Update shell-version in metadata.json
  • Update shell-version and description to be more comprehensive
  • Update shell-version in metadata.json
  • Update shell-version in metadata.json

Relevant Code

See js/ui/keyboard.js. Here are links for some versions after 3.36:

The structure of code is:

var KeyboardManager = class KeyBoardManager {
    constructor() {
        ...
    }

    _lastDeviceIsTouchscreen() {

        if (!this._lastDevice)
            return false;

        let deviceType = this._lastDevice.get_device_type();
        return deviceType == Clutter.InputDeviceType.TOUCHSCREEN_DEVICE;
    }

    ...
}

This extension simply replaces _lastDeviceIsTouchscreen with a function that always returns false.

In GNOME Shell 3.34 and earlier, the class was named Keyboard instead of KeyboardManager. So keringar's extension no longer works after GNOME Shell 3.36.

Development Hints

Looking Glass is very helpful for debugging (saves my time installing an IDE etc).

To create a zip file for https://extensions.gnome.org/upload/, use zip -j a.zip extension.js metadata.json

RESOLVED https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1723857

cariboublocker

Prevents caribou from appearing when you use a touchscreen with the on screen keyboard disabled

Installation

  1. https://extensions.gnome.org/extension/1326/block-caribou/
  2. You may need to install an extension, Gnome Shell Integration, see the gnome extensions about page for more details.
  3. Click the toggle flag in the top right to ON.

About

Prevents caribou from appearing when you use a touchscreen with the on screen keyboard disabled in gnome-shell 3.36

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 96.6%
  • CSS 3.4%