On Sat, 15 Feb 2020 18:30:24 +0100, "R.Wieser"
declaimed the following:
>Dennis,
>
>> It's also quite likely specific to the manager in use...
>
>Besides that, yes.
>
>By the way, my
>[quote]
>One possible method would be to start the script with a delay and in that
>time check for a (repeated) keydown event.
>[/quote]
>idea doesn't pan out: no repeated keydown events. :-\ (or at least, they
>do not show up using "bind")
>
Probably not helpful... Especially for the modifier keys (as a test, I
just held down the key and only got one toggling of the menu bar
shortcuts -- not a toggle, delay, toggle, toggle, toggle... {Win10, but I
suspect most OS's handle the modifier keys the same way -- they may
generate an event once, but after that they are "state information"
retrieved using a different method})
https://stackoverflow.com/questions/48142010/how-to-detect-if-a-key-is-being-he
ld-down-in-tkinter
From Tkinter source
"""
def bind(self, sequence=None, func=None, add=None):
"""Bind to this widget at event SEQUENCE a call to function FUNC.
SEQUENCE is a string of concatenated event
patterns. An event pattern is of the form
where MODIFIER is one
of Control, Mod2, M2, Shift, Mod3, M3, Lock, Mod4, M4,
Button1, B1, Mod5, M5 Button2, B2, Meta, M, Button3,
B3, Alt, Button4, B4, Double, Button5, B5 Triple,
Mod1, M1. TYPE is one of Activate, Enter, Map,
ButtonPress, Button, Expose, Motion, ButtonRelease
FocusIn, MouseWheel, Circulate, FocusOut, Property,
Colormap, Gravity Reparent, Configure, KeyPress, Key,
Unmap, Deactivate, KeyRelease Visibility, Destroy,
Leave and DETAIL is the button number for ButtonPress,
ButtonRelease and DETAIL is the Keysym for KeyPress and
KeyRelease. Examples are
for pressing Control and mouse button 1 or
for pressing A and the Alt key (KeyPress can be omitted).
An event pattern can also be a virtual event of the form
> where AString can be arbitrary. This
event can be generated by event_generate.
If events are concatenated they must appear shortly
after each other.
"""
Note the list of those considered MODIFIER and not DETAIL.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|