kupferlauncher / keybinder Goto Github PK
View Code? Open in Web Editor NEW``keybinder`` is a library for registering global key bindings, for gtk-based applications in X11. With gir bindings.
License: MIT License
``keybinder`` is a library for registering global key bindings, for gtk-based applications in X11. With gir bindings.
License: MIT License
Hi there.
I made my app which uses this package and it worked fine in Cinnamon. But I recently shifted to GNOME 3 and whatever key I try to bind, it simply tells me "Binding <my key> failed". I thought that this issue was with my app and so used the example provided by this repository and it also gives me the same error.
Using : Python 3
Keybinder : 3.0
OS : Debian Buster
Hi there,
I've been using keybinder3 with gir bindings for a while. Now I'm looking for a way to make it work in Wayland session. After doing some research I found this:
GTK3 + gir bindings - works in X session, doesn't work in Wayland
GTK2 + python-keybinder lib - works in X and Wayland session
Can someone explain this behavior please?
Thanks.
Hi,
Using keybinder as part of https://github.com/Guake/guake and ran into an issue where I cannot bind T. Guake/guake#759
Looking for any noob assistance in debugging this. I write PHP/JS but this is deeper than I know how to debug right now. Any guidance appreciated.
I downloaded the example at https://raw.githubusercontent.com/engla/keybinder/master/examples/example.py and it worked with the <Ctrl>A
shortcut by default. I changed it to <Shift><Alt>T
and it stopped working so it appears something is funky with my keybinder.
$ locate keybinder
/usr/lib/libkeybinder.so.0
/usr/lib/libkeybinder.so.0.1.0
/usr/lib/pyshared/python2.7/keybinder
/usr/lib/pyshared/python2.7/keybinder/_keybinder.so
/usr/lib/python2.7/dist-packages/keybinder
/usr/lib/python2.7/dist-packages/keybinder/__init__.py
/usr/lib/python2.7/dist-packages/keybinder/__init__.pyc
/usr/lib/python2.7/dist-packages/keybinder/_keybinder.so
/usr/share/doc/libkeybinder0
/usr/share/doc/python-keybinder
/usr/share/doc/libkeybinder0/AUTHORS
/usr/share/doc/libkeybinder0/README
/usr/share/doc/libkeybinder0/changelog.Debian.gz
/usr/share/doc/libkeybinder0/copyright
/usr/share/doc/python-keybinder/changelog.Debian.gz
/usr/share/doc/python-keybinder/copyright
/usr/share/pyshared/keybinder
/usr/share/pyshared/keybinder/__init__.py
/var/cache/apt/archives/libkeybinder0_0.3.0-2_amd64.deb
/var/cache/apt/archives/python-keybinder_0.3.0-2_amd64.deb
/var/lib/dpkg/info/libkeybinder0.list
/var/lib/dpkg/info/libkeybinder0.md5sums
/var/lib/dpkg/info/libkeybinder0.postinst
/var/lib/dpkg/info/libkeybinder0.postrm
/var/lib/dpkg/info/libkeybinder0.shlibs
/var/lib/dpkg/info/libkeybinder0.symbols
/var/lib/dpkg/info/python-keybinder.list
/var/lib/dpkg/info/python-keybinder.md5sums
/var/lib/dpkg/info/python-keybinder.postinst
/var/lib/dpkg/info/python-keybinder.prerm
I know this is very late and the last release was a year ago, but when I download the tarball for the latest release from github, I get:
keybinder-keybinder-3.0-v0.3.2.tar.gz
when I think is should be simply:
keybinder-0.3.2.tar.gz
The tarball also extracts to the directory keybinder-keybinder-3.0-v0.3.2 and this is confusing.
As a new user of python and github I am frustrated that there is no instructions in the readme on how to actually install keybinder. I can download it, I can even clone it, but I just want to install it on my Mac - help. Please, just show me the explicit command to run. Thanks.
Test code
import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Keybinder', '3.0')
from gi.repository import Gtk
from gi.repository import Keybinder
def callback(keystr, user_data):
print( "Handling", keystr, user_data)
print( "Event time:", Keybinder.get_current_event_time())
Gtk.main_quit()
if __name__ == '__main__':
keystr = "<Ctrl>A"
Keybinder.init()
Keybinder.bind(keystr, callback, "Keystring %s (user data)" % keystr)
print( "Press", keystr, "to handle keybinding and quit")
Gtk.main()
Exception
/mnt/home/eri/Projects/2024/AIS/kiosk-starter/~/Kiosk/test.py:15: Warning: cannot register existing type 'GdkDisplayManager'
Keybinder.init()
/mnt/home/eri/Projects/2024/AIS/kiosk-starter/~/Kiosk/test.py:15: Warning: g_once_init_leave: assertion 'result != 0' failed
Keybinder.init()
/mnt/home/eri/Projects/2024/AIS/kiosk-starter/~/Kiosk/test.py:15: Warning: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
Keybinder.init()
Python 3.10
Ubuntu 22.04
libgtk-4-1 ver 4.6.9
libgtk-3-0 ver 3.24.33
I have issues building the python2 version of keybinder on fedora.
It fails with the following build error:
https://bugzilla.redhat.com/attachment.cgi?id=1463339
The whole bug report can be found at:
https://bugzilla.redhat.com/show_bug.cgi?id=1604486
Thanks a lot!
Trying to bind KP_5
does nothing. Applications get KP_5
normally, and the keybinder callback is not invoked.
Strangely, KP_Begin
(same physical key as KP_5) works, but only if numlock is off. If numlock is on, KP_5 doesn't work anywhere (I suppose libkeybinder grabs the key, but ignores it).
Gimp can bind KP_5
(as application specific key bind and not as a global one, of course). If Gimp really uses gtk_accelerator_parse() as I'd expect, it means the string is correct. (You never know, because it's so badly documented. Always a waste of time trying to find out what a key binds to.)
How do I build the GTK3 version? configure shows it building for GTK2 and I don't see any configure options for GTK version.
Thanks.
How do I build this library for GTK3? Is there a configure option? With the default options it seems to only have built the GTK2 version of the library.
version 0.3.2
./configure --prefix=/usr --enable-gtk-doc
make
results in:
warning: failed to load external entity "../xml/tree_index.sgml"
../keybinder-docs.sgml:26: element include: XInclude error : could not load ../xml/tree_index.sgml, and no fallback was found
make[1]: *** [Makefile:730: html-build.stamp] Error 6
make[1]: Leaving directory '/build/libkeybinder3/src/keybinder-3.0-0.3.2/docs'
Where are those SGML file supposed to come from?
Let it render in markdown, you've already done the markdown formatting work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.