Open sneetsher opened 6 years ago
I never used the extension b4, thought it was a nice idea so installed it following readme instructions but its not working 4 me on GNOME Shell 3.28.2 on Arch. Not sure if its enabled: $ gsettings get org.gnome.shell enabled-extensions | grep -o keyboard_modifiers_status keyboard_modifiers_status
But the extension is not listed @ all @ https://extensions.gnome.org/local/ or Gnome Tweak Any Idea on what's wrong?
@VVhitehead Are you could check it if is listed in gnome-tweak-tool
→ Extensions tab. Also if you can run:
gjs ~/.local/share/gnome-shell/extensions/keyboard_modifiers_status@sneetsher/test_gjs_gdk_modifiers.js
To check if can detect the state of keys for modifiers.
I have already checked that when I commented.. no show... The gjs script wouldn't run so I had to slightly modify it and came up with one that works but just prints zeroes.
#!/usr/bin/gjs
//This script is only to test on non supported gnome shell version
//or to help in debuging
imports.gi.versions.Gtk = "3.0";
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Gdk = imports.gi.Gdk;
const Lang = imports.lang;
const mainloop = imports.mainloop;
//OK
Gtk.init(null);
//NO
//Gdk.init(ARGV);
print("Hello World!");
let _display = Gdk.Display.get_default()
let _keymap = Gdk.Keymap.get_for_display(_display);
let _state = _keymap.get_modifier_state();
print(""+_state);
GLib.timeout_add_seconds(0, 1, function () {
_state = _keymap.get_modifier_state ();
print(""+_state);
return true;
});
//OK
Gtk.main();
//OK
mainloop.run();
since the output of:
gjs ~/.local/share/gnome-shell/extensions/keyboard_modifiers_status/test_gjs_gdk_modifiers.js
4 me is:
```
Hello World!
0
0
0
^C
```
I still know very little about extensions but **I'd really like to help if possible.** @VVhitehead Just pinging for update. It took me a while to find a solution for #5 Wayland issue. Thanks for our friends they raised a feature request to gnome-shell upstream project. Hope there will solution from Gnome itself.
The last code is working for Xorg and Wayland, at least for modifiers effective status. Latch & lock added lately but only are showing in Wayland.
Have nice day.
@sneetsher GNOME 42 is here :sweat_smile: The Extensions app labels the extension as incompatible with 42
@jayesh-bhoot thank you for reporting. It is reported that Ubuntu 22.04 has Gnome 42, I will check it soon.
Could I ask you which distribution with Gnome 42 are you using?
NixOS 21.11. But I don't expect you to test on it as long as the extension works with GNOME 42.
@jayesh-bhoot added Gnome 42 and already released to gnome extension site, thank you.
Works. Thank you!
Gnome-Shell Compatibility Testing
When I wrote this extension for first time, it was in Ubuntu 16.04 with Gnome 3.14. Later, I found really inconvenient & time consuming to test such small extension with with every release of gnome. They were changing much and there is no small live distribution to test with.
So I'm not running after its releases, but I update as I go by one. Also interested users may share their experience, if I missed a release.
Compatibility:
Pointers to gnome-shell version listing: