Simple Linux kernel module that utilizes input subsystem to count particular key press(in our case it is ALT_RIGHT) and exposes that value by sysfs. Which is displayed using GNOME-EXTENSION.
it is little bit complicated. for this you need to i will explain ruffly about is, as the step may differ on differnet machine.
-
build the module
make -j$(proc) -
cp sysfs_count.ko /lib/modules/$(shell uname -r)/extra/ -
cp sysfs-count-sync.service /etc/systemd/system/ -
cp system-files/modules-load.d/sysfs_count.conf /etc/modules-load.d/ -
cp system-files/modprobe.d/sysfs_count.conf /etc/modprobe.d -
mkdir $HOME/.local/share/gnome-shell/extensions/sync-counter@ankitkhushwaha@github.com -
cp -n ./gnome-extension/{extension.js,metadata.json,stylesheet.css} $HOME/.local/share/gnome-shell/extensions/sync-counter@ankitkhushwaha@github.com