keybinder 0.1.0
A minimal D application.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
libkeybinder bindings for D
libkeybinder is a GTK+ library for setting global keybindings. These are keybindings that apply across the whole desktop, even if the application is not in focus.
Get it
Add "keybinder": "~>0.1.0"
to your dub.json.
Using with GTK+
libkeybinder is designed to work with GTK+:
import gtk.lotsOfStuff;
static import keybinder;
void main()
{
auto app = new Application();
app.addOnActivate(delegate void(GioApplication a)
{
keybinder.init();
keybinder.bindGlobal("<Super>f", () {
writeln("<Super>f was pressed");
});
});
}
Using without GTK+
Using this library without GTK+ (for instance, using DLangUI) requires a bit of extra work:
import std.stdio, core.thread, core.time;
static import keybinder;
void main()
{
keybinder.initNoGTK();
keybinder.bindGlobal("<Super>f", () {
writeln("<Super>f was pressed");
});
while (true)
{
keybinder.poll();
sleep(dur!"msecs"(50));
}
}
This still requires GTK+, but you don't have to deal with it yourself.
However, if you're not using GTK+, why not use WebFreak001's XKeyBinD?
- Registered by Christopher Wright
- 0.1.0 released 7 years ago
- dhasenan/keybinder
- public domain
- Copyright © 2017, dhasenan
- Authors:
- Dependencies:
- none
- Versions:
-
0.1.0 2017-May-29 ~master 2017-May-30 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
19 downloads total
-
- Score:
- 0.7
- Short URL:
- keybinder.dub.pm