xkey

Need help with C, C++, perl, python, etc?

xkey

Postby Mr James » 2019-08-03 12:11

Hey guys.

So I made a thing. It is called xkey and it is a teeny-weeny xbindkeys replacement is the suckless spirit.
Have a look if interested and feel free to post any criticisms/requests, or star it if you like it.

https://github.com/mreyoud/xkey
asus S551L laptop :: debian stable :: dwm
User avatar
Mr James
 
Posts: 1255
Joined: 2010-09-10 13:02

Re: xkey

Postby tynman » 2019-08-03 13:34

I thought that looked interesting, so I downloaded it. Found nothing in the README file to indicate how to compile it, so I just ran make. That created a binary file named xkey, so I thought that was a good sign. I then ran it with
Code: Select all
> ./xkey &

Since the only thing in the default config.h file is
Code: Select all
{ ControlMask,  XK_t,   "xterm" }

I took a guess that this meant if I press CTRL-t, it should start the Xterm terminal application. It did not. Nothing happens when I press Ctrl-t. Perhaps I am misinterpreting the meaning of "ControlMask" and/or "XK_t". Maybe I am missing the whole point of your program :).

I verified Xterm is installed by starting it with
Code: Select all
> xterm


I verified xkey is running with
Code: Select all
08:07:51  $> ps -ef | grep xkey
ben      25800     1  0 08:07 ?        00:00:00 ./xkey
ben      25932 13031  0 08:08 pts/1    00:00:00 grep xkey


?
tynman
 
Posts: 111
Joined: 2016-05-03 19:48
Location: British Columbia, Canada

Re: xkey

Postby Mr James » 2019-08-03 21:32

Right.

First, yes, compilation and installation is done by "make" followed by "sudo make install".
Second, if you are running the program within Wayland it won't work. X11 only.
Third, yes, you edit config.h prior to compiling to configure the thing. Add whatever bindings you want, following the example provided.
And finally, yes, ControlMask is CTRL, and XK_t is 't'. See the X11 headers.

Fun fact: If in Wayland, fire up a GTK2 program, say Firefox, with xkey running, and with said program focused, xkey works.
asus S551L laptop :: debian stable :: dwm
User avatar
Mr James
 
Posts: 1255
Joined: 2010-09-10 13:02


Return to Programming

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable