kinto
kinto copied to clipboard
how to multi-repeat key in a specific program?
For example while playing a game on Brave/Chrome, I had the number "2" sending as many and fast as possible "w" I have been trying everything but I cant make it work for extra points this should only work if a specific keyword is detected in the TAB/WINDOW of Brave
So onKeyPress "2" send as many as possible "w" untill onKeyLift
@sahfd4eiugf
I'm not the Kinto dev, just a user and minor contributor.
Until Kinto migrates to using the xkeysnail
fork keyszer
, it won't have support for matching on the window "name" or "title" (which is what you need to match a particular tab in a web browser), it can only match on the application "class".
There is another project I am working on that uses keyszer
and would probably be able to do what you want.
When you have that tab open in your web browser, run this command in a terminal and then Cmd+Tab back to the browser window and click with the mouse anywhere on the browser window. This should show both the application class and the tab name in the terminal.
xprop WM_CLASS _NET_WM_NAME
@sahfd4eiugf
I shouldn't have assumed that you are on Linux, since there is a Windows version of Kinto.
What operating system, version of the OS, and desktop environment (if Linux) are you using?
You said you had it working before, but how and where?
Even if the remap from 2
to w
was working, the repeat rate of the keyboard will determine how quickly the w
key will come out of the virtual keyboard device. On Linux that is changed with the xset -r
command, which you should google if you are on Linux. How well that works for your purpose is not really going to be up to the keymapper.
PopOS from Ubuntu 22
So I had to a special fix that is written here somewhere to return the name of the Title window, not just it's class from the service. IMO that should be de-facto.
Then a simple
custom multi repeat
define_keymap(lambda wm_class: 'Agar' in wm_class ,{ K("Key_2"): [K("w"),K("w"),K("w")], })