Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

2
Become a Fan
6.8

Available as/for:
Description:
A Qt based keystroke visualization tool for Linux.

This is helpful when creating screencasts where you want to show what you are typing. E.g. when using vim.

See http://www.youtube.com/watch?v=OsQeZZ8HPIM for a short demo.
Last changelog:

Made first real release v0.0.2.

This incorporates feedback from kde-apps.org. See changelog for more details: https://github.com/gergap/keystroke


Ratings & Comments

22 Comments

nowardev

[ 85%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/dialog.cpp.o [ 88%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/aboutdialog.cpp.o /home/shared/git/keystroke-master/gui/aboutdialog.cpp: In constructor ‘AboutDialog::AboutDialog(QWidget*)’: /home/shared/git/keystroke-master/gui/aboutdialog.cpp:27:110: error: ‘GIT_SHA1’ was not declared in this scope ui.lblVersion->setText(tr("Version: %1 %2\nBuild from Git: Sha %3").arg(VERSION).arg(VERSION_SUFFIX).arg(GIT_SHA1)); ^ make[2]: *** [gui/CMakeFiles/keystroke-gui.dir/aboutdialog.cpp.o] Error 1 make[1]: *** [gui/CMakeFiles/keystroke-gui.dir/all] Error 2 make: *** [all] Error 2

gergap

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

nowardev

ok deleted git repo re-downloaded => fixed sorry

srog

Tested with the Kubuntu 12.04/12.10/13.10 & KDE 4.8/4.9/4.11. Working without problems. Noticed that - if you are wrapping the app to the deb package the dh_fixperms will overwrite the permissions and you will get the 'Cannot open device' error. Workaround is to override the dh_fixperms or later set the permissions: http://imgur.com/9kTVRK2 . Thank you of a good app...

gergap

thx for that info. nice to hear that it works also on Debian. I'm using Gentoo.

nowardev

ok the program works but only with the primary keyboard , i use a second keyboard usb and with that it doesn't work , instead using the primary keyboard it works. i have a laptop :D solutions ? i love the penguin popup when i type window's button heheh

gergap

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.

nowardev

i did :D now it's pefect

nowardev

deosn't work it is running but it doesn't do the job :S The C compiler identification is GNU 4.8.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- The CXX compiler identification is GNU 4.8.1 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - found -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found -- Found Qt4: /usr/bin/qmake (found version "4.8.4") -- Configuring done -- Generating done -- Build files have been written to: /home/shared/git/keystroke-master/bld make -j3 [ 4%] [ 8%] Scanning dependencies of target keystroke Generating qmlapplicationviewer/moc_qmlapplicationviewer.cxx Generating ui_dialog.h [ 13%] Building C object CMakeFiles/keystroke.dir/main.c.o [ 17%] Generating moc_keygrabber.cxx [ 21%] [ 26%] Generating moc_dialog.cxx Generating moc_file.cxx [ 30%] [ 34%] Building C object CMakeFiles/keystroke.dir/keymap.c.o Generating moc_settings.cxx [ 39%] Generating qrc_keystroke.cxx Scanning dependencies of target keystroke-gui Linking C executable keystroke [ 39%] Built target keystroke [ 43%] [ 47%] [ 52%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_keygrabber.cxx.o Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_dialog.cxx.o Building CXX object gui/CMakeFiles/keystroke-gui.dir/qmlapplicationviewer/moc_qmlapplicationviewer.cxx.o [ 56%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_file.cxx.o [ 60%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_settings.cxx.o [ 65%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/qrc_keystroke.cxx.o [ 69%] Building C object gui/CMakeFiles/keystroke-gui.dir/__/main.c.o [ 73%] Building C object gui/CMakeFiles/keystroke-gui.dir/__/keymap.c.o [ 78%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/gui.cpp.o [ 82%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/keygrabber.cpp.o [ 86%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/dialog.cpp.o [ 91%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/file.cpp.o [ 95%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/settings.cpp.o [100%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/qmlapplicationviewer/qmlapplicationviewer.cpp.o Linking CXX executable keystroke-gui [100%] Built target keystroke-gui sem@peace-SVE1512Y1ESI:/home/shared/git/keystroke-master/bld$ sudo make install [ 8%] Built target keystroke [100%] Built target keystroke-gui Install the project... -- Install configuration: "" -- Installing: /usr/bin/keystroke -- Installing: /usr/bin/keystroke-gui -- Up-to-date: /usr/bin/qml/KeyStrokeOverlay.qml -- Up-to-date: /usr/bin/qml/Key.qml

nowardev

deosn't work it is running but it doesn't do the job :S The C compiler identification is GNU 4.8.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- The CXX compiler identification is GNU 4.8.1 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - found -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found -- Found Qt4: /usr/bin/qmake (found version "4.8.4") -- Configuring done -- Generating done -- Build files have been written to: /home/shared/git/keystroke-master/bld make -j3 [ 4%] [ 8%] Scanning dependencies of target keystroke Generating qmlapplicationviewer/moc_qmlapplicationviewer.cxx Generating ui_dialog.h [ 13%] Building C object CMakeFiles/keystroke.dir/main.c.o [ 17%] Generating moc_keygrabber.cxx [ 21%] [ 26%] Generating moc_dialog.cxx Generating moc_file.cxx [ 30%] [ 34%] Building C object CMakeFiles/keystroke.dir/keymap.c.o Generating moc_settings.cxx [ 39%] Generating qrc_keystroke.cxx Scanning dependencies of target keystroke-gui Linking C executable keystroke [ 39%] Built target keystroke [ 43%] [ 47%] [ 52%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_keygrabber.cxx.o Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_dialog.cxx.o Building CXX object gui/CMakeFiles/keystroke-gui.dir/qmlapplicationviewer/moc_qmlapplicationviewer.cxx.o [ 56%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_file.cxx.o [ 60%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_settings.cxx.o [ 65%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/qrc_keystroke.cxx.o [ 69%] Building C object gui/CMakeFiles/keystroke-gui.dir/__/main.c.o [ 73%] Building C object gui/CMakeFiles/keystroke-gui.dir/__/keymap.c.o [ 78%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/gui.cpp.o [ 82%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/keygrabber.cpp.o [ 86%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/dialog.cpp.o [ 91%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/file.cpp.o [ 95%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/settings.cpp.o [100%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/qmlapplicationviewer/qmlapplicationviewer.cpp.o Linking CXX executable keystroke-gui [100%] Built target keystroke-gui sem@peace-SVE1512Y1ESI:/home/shared/git/keystroke-master/bld$ sudo make install [ 8%] Built target keystroke [100%] Built target keystroke-gui Install the project... -- Install configuration: "" -- Installing: /usr/bin/keystroke -- Installing: /usr/bin/keystroke-gui -- Up-to-date: /usr/bin/qml/KeyStrokeOverlay.qml -- Up-to-date: /usr/bin/qml/Key.qml

gergap

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.

nowardev

ok the program works but only with the primary keyboard , i use a second keyboard usb and with that it doesn't work , solutions for secondary usb keyboard? btw i love the penguin popup when i type window's button heheh , and thank you for the good idea and work.

roctheme

Try to run keystroke or keystroke-gui, I receive this error: Cannot open device '/dev/input/by-path/platform-i8042-serio-0-event-kbd'

gergap

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

roctheme

Thank you for explanation. I was not sure how to build the executable, so I have do this (on Kubuntu 13.10 amd64): mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. sudo make install

roctheme

Thank you for explanation. I was not sure how to build the executable, so I have do this (on Kubuntu 13.10 amd64): mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. make sudo make install

roctheme

/dev/input/by-path/platform-i8042-serio-0-event-kbd exist on my platform.

roctheme

sudo chmod u+s keystroke-gui sudo chown root keystroke-gui was already set. I have set it again, but I receive the same error message: Cannot open device '/dev/input/by-path/platform-i8042-serio-0-event-kbd' Try to starting as root with sudo: Cannot open device '/dev/input/by-path/platform-i8042-serio-0-event-kbd' WARNING: running as root! It's recommended to start this application as normal user, owned be root with setuid bit set (rwsr-xr-x).

roctheme

cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=Release .. -- The C compiler identification is GNU 4.8.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- The CXX compiler identification is GNU 4.8.1 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - found -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found -- Found Qt4: /usr/bin/qmake (found version "4.8.4") -- Configuring done -- Generating done -- Build files have been written to: /home/user/Downloads/keystroke/build make -j4 [ 4%] [ 8%] Scanning dependencies of target keystroke [ 13%] Generating moc_keygrabber.cxx Generating qmlapplicationviewer/moc_qmlapplicationviewer.cxx Generating ui_dialog.h [ 17%] Building C object CMakeFiles/keystroke.dir/main.c.o [ 21%] Generating moc_dialog.cxx [ 26%] Generating moc_file.cxx [ 30%] Generating moc_settings.cxx [ 34%] Generating qrc_keystroke.cxx [ 39%] Building C object CMakeFiles/keystroke.dir/keymap.c.o Scanning dependencies of target keystroke-gui Linking C executable keystroke [ 39%] Built target keystroke [ 43%] [ 47%] [ 52%] [ 56%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/qmlapplicationviewer/moc_qmlapplicationviewer.cxx.o Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_dialog.cxx.o Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_keygrabber.cxx.o Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_file.cxx.o [ 60%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/moc_settings.cxx.o [ 65%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/qrc_keystroke.cxx.o [ 69%] Building C object gui/CMakeFiles/keystroke-gui.dir/__/main.c.o [ 73%] [ 78%] Building C object gui/CMakeFiles/keystroke-gui.dir/__/keymap.c.o Building CXX object gui/CMakeFiles/keystroke-gui.dir/gui.cpp.o [ 82%] [ 86%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/keygrabber.cpp.o Building CXX object gui/CMakeFiles/keystroke-gui.dir/dialog.cpp.o [ 91%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/file.cpp.o [ 95%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/settings.cpp.o [100%] Building CXX object gui/CMakeFiles/keystroke-gui.dir/qmlapplicationviewer/qmlapplicationviewer.cpp.o Linking CXX executable keystroke-gui [100%] Built target keystroke-gui sudo make install [ 8%] Built target keystroke [100%] Built target keystroke-gui Install the project... -- Install configuration: "Release" -- Installing: /usr/bin/keystroke -- Installing: /usr/bin/keystroke-gui -- Installing: /usr/bin/qml/KeyStrokeOverlay.qml -- Installing: /usr/bin/qml/Key.qml

roctheme

Sorry ! I have try it first on a PC with USB keyboard (same like User nowardev). Now I have install it on a Notebook with internal keyboard and it works! Thank you.

roctheme

I have change in main.c the keyboard device file: #define KBD_DEVICE "/dev/input/by-path/pci-0000:00:1d.0-usb-0:1.3:1.2-event-kbd" Now it works.

gergap

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.

Pling
0 Affiliates
Details
license
version 0.0.2
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 2

Other System Tools (NOT OS or ROMS):

KDE CDEmu Manager
marcel83
last update date: 1 year ago

Score 7.0

QPhotoRec
caezsar
last update date: 11 years ago

Score 5.7

Burg-manager
ingalex
last update date: 14 years ago

Score 7.4

Multi-Platform File Manager
Lunik
last update date: 21 years ago

Score 5.0

KFS
jrockey
last update date: 21 years ago

Score 5.0

dolphin-perforce-plugin
martin9000andersen
last update date: 11 years ago

Score 5.0



System Tags