Image 01
profile-image

gergap

Gerhard Gappmeier Erlangen, Germany
System Software
Keystroke

System Software 22 comments

Score 70.0%
Feb 02 2014
strange. can you try a clean build?
maybe the code is loading a stale config.h file.

git clean -fd
./build.sh

The CMake step should create a config.h in your bld directory. There the macro GIT_SHA1 should be defined.

You can also check the preprocessor output to analyze the problem.

cd bld/gui
make aboutdialog.i
vi CMakeFiles/keystroke-gui.dir/aboutdialog.cpp.i

See http://wstaw.org/m/2014/02/03/plasma-desktopwA3092.png
- Feb 03 2014
hi, nice to hear that it works for you too now.

With v0.0.2 you can now use the commandline option to change the device:
/usr/local/bin/keystroke-gui -d /dev/input/by-path/pci-0000:00:1d.0-usb-0:1.3:1.2-event-kbd

this is the temporary solution for now, so that you don't need to hack the C file.

in the next version I'll add a configuration option for that which will be store in the config file.

- Feb 03 2014
thx for that info. nice to hear that it works also on Debian. I'm using Gentoo. - Jan 31 2014
sure,

the program uses the symlink /dev/input/by-path/platform-i8042-serio-0-event-kbd to find the correct input device. This is your primary keyboard.

in main.c:43 there is this define
#define KBD_DEVICE "/dev/input/by-path/platform-i8042-serio-0-event-kbd"

Replace it with your keyboard device you want to use and recompile.

That's the only sulution at the moment. In future version I'll add configuration options for that.
- Jan 31 2014
can you better describe what is not working?
key logging? do you see intercepted keyboard events on konsole?
do you see the systray?
do you see the keyboard events at the bottom of the screen? The tool chooses your primary screen by default in the case you are working on a dual-head system.

You can log the output of the tool this way:
/usr/local/bin/keystroke-gui >log.txt 2>&1

then load the log to your favorite pastebin and post the link here.

- Jan 31 2014
The executable must be owned by root and the setuid bit must be set, because the application needs root privileges to open the keyboard device.

The cmake install step should do this for you:
sudo make install
./dist/bin/keystroke-gui

or try to set it manually
sudo chown root keystroke-gui
sudo chmod u+s keystroke-gui

I'll add a more detailed INSTALL file as soon as possible to clarify that problem.

And just to go for sure: Does the symlink /dev/input/by-path/platform-i8042-serio-0-event-kbd exist on your system?

thx for your feedback - Jan 30 2014
nanoKalc

Science
by arenyart

Score 50.0%
Sep 26 2009
Score 61.3%
9   Jun 12 2011