-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Macro Repetitions #61
Comments
Normal keys don't actually get repeated, they just don't generate a key up event until they are released. This gets interpreted higher up the input stack as 'multiple keypresses'. Macros by contrast consist of multiple key sequences which have no notion of being 'held down' E.G
Baked into the definition of a macro is a set of key releases. As you noted, it is possible to treat these as logical units by synthetically generating 'repeat events' which repeat all key up/down pairs for a second time, but this increases complexity and can produce unintuitive results (e.g accidental multikey actuations, chained timeouts, etc). In practice I am not convinced that macros need to be repeated often enough (when an additional deliberate actuation makes sense) to warrant making them repeatable in this way. Can you provide an example of when this would be useful? |
Not yet sure that my code is the right way to go for the specific task, hut here it is: The idea is to move windows on the desktop (Gnome in this case) with one hand without finger acrobatics (laptop keyboard)...
This is a functional port of my AutoHotKey setup on windows, but the windows version is cleaner as it's directly moving windows rather than sending keys... This specific task aside, macro repeat would be useful for things like escape sequence mappings, control key sequences and the like.
P.P.S. I see what you mean about repeats (level), I originally thought that |
Even if you could repeat this, it would probably not work as seamlessly as you expect. The 20ms timeout would apply to each repetition and there would be a lot of redundant 'move mode' activations. There would also have to be an additional timeout before the actual repeat events to stagger them properly and prevent accidental actuations. Fundamentally you want to change the behaviour of the window manager so that |
Yes, that's exactly why the best default here would be the system repeat settings... though I'm not sure how fragmented this is in the Linux distro zoo =)
Yes indeed, this is definitely not the best way to solve this problem, it's a bit cringe-y to me to have to solve essentially a window-manager-level issue at the kernel level, but it's simple and it works, and since Gnome exposes only a But we got a bit off track =) IMHO, all keys (bindings/mappings) should behave consistently (POLS), in case of a key triggering a
On the interface level, i.e. "a user presses a physical key" a key bound to a macro is not (should not be) different to any other key thus it would be quite logical to expect it to behave as any other key press. General use cases that I see for this (my hack aside) are:
|
This is indeed the correct approach (in conjunction with bugging upstream for sane defaults ;)).
I am inclined to agree, the original implementation was conservative to avoid breaking things in combination. I also didn't
I hadn't considered this, though I would like to meet the person that uses it for this purpose :P. You have persuaded me to make this the default behaviour, but I am currently in the process of cleaning up the config logic and making some design changes in preparation for version 2.0. I should get to this shortly after that has been released. |
Well..... I was speaking from experience but that was a couple of projects more than a decade back where I couldn't use anything fancy like curses/ncurses =) |
This should be supported in the latest version. Sorry for the delay. |
I'm closing this for now. Feel free to reopen it. |
Hi
The keys remapped to a
macro( .. )
are triggered once per press and do not get repeated as normal keys when the key sequence is held down.To reproduce:
Pressing and holding
leftshift
will print "xx" only once and will never repeat.Expected behavior:
Repeating is expected by default.
In case of macros (IMHO) repeating the whole macro would be logical, also by default.
Would be nice to be able to control in config:
Thanks for a great piece of software!
P.S. I'm not suggesting a specific syntax here as I both do not have the feel for it yet and I did not dive into the implementation (yet)...
The text was updated successfully, but these errors were encountered: