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 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.
This extension is available at the official GNOME Shell Extensions website: https://extensions.gnome.org/extension/3222/block-caribou-36/
Go to Releases, and
choose the zip file corresponding to your gnome-shell version. Then
gnome-extensions install <your-gnome-shell-version>.zip
.
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:
- In dconf, set
disable-extension-version-validation
(in/org/gnome/shell/
) to True. See https://gjs.guide/extensions/overview/anatomy.html#shell-version. - 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"
. - Wait for the extension maintainer (currently lxylxy123456) to update the extension. Maybe notifying the maintainer on extensions.gnome.org or GitHub can help.
- 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
- Replace
Keyboard
withKeyboardManager
inextensions.js
.
- Simply change
"shell-version"
inmetadata.json
to40.0
. For some reason the version string"3.36.3"
still works on Fedora 33's gnome-shell-3.38.
- Update
shell-version
inmetadata.json
- Update
shell-version
inmetadata.json
- Update
shell-version
and description to be more comprehensive
- Update
shell-version
inmetadata.json
- Update
shell-version
inmetadata.json
- Rewrite by @TheBrokenRail following https://gjs.guide/extensions/upgrading/gnome-shell-45.html#esm. See #4
See js/ui/keyboard.js
. Here are links for some versions after 3.36:
- main: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/keyboard.js
- gnome-44: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/63904a09bf34f95c23de711fda02c2c6bfa56e4a/js/ui/keyboard.js#L1213
- gnome-43: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/d2cbd453077b3395d17ba91744d97550f43728d9/js/ui/keyboard.js#L1213
- gnome-42: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/8dc0ca5eebdeda668418f02cd544b19589872fc6/js/ui/keyboard.js#L1174
- gnome-41: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/040a5d34d7a5601ad2a2f622fd9a393c5e08be5f/js/ui/keyboard.js#L1164
- gnome-40: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/821ff3bb887cfbbc080dc737b6084282213d0e7b/js/ui/keyboard.js#L1167
- gnome-3-38: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/cf9d73ed5d316093ad7284ce5df95bce51409f28/js/ui/keyboard.js#L1129
- gnome-3-36: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/40a003e5acaddb74ddd3f02294b0b4bc01ac1d3f/js/ui/keyboard.js#L1130
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.
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
Original README.md from https://github.com/keringar/cariboublocker
RESOLVED https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1723857
Prevents caribou from appearing when you use a touchscreen with the on screen keyboard disabled
- https://extensions.gnome.org/extension/1326/block-caribou/
- You may need to install an extension, Gnome Shell Integration, see the gnome extensions about page for more details.
- Click the toggle flag in the top right to ON.