Sujet : Re: how can I detect if the shift key is currently down (on windows) (twapi?)
De : et99 (at) *nospam* rocketship1.me (et99)
Groupes : comp.lang.tclDate : 03. Aug 2024, 20:11:30
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v8lvd2$3j5at$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1
On 8/1/2024 11:19 AM, et99 wrote:
On 7/31/2024 9:47 PM, Ashok wrote:
proc is_shift_down {} {expr {!!([twapi::GetAsyncKeyState 0x10] & 0x8000)}}>
I've expanded the above to allow for any key to be tested for up/down and also optionally return the status of the key having been recently pressed, as documented in the windows function GetAsyncKeyState. I've posted the code for this to the wiki here (at the bottom):
https://wiki.tcl-lang.org/page/KeySyms+on+platforms+other+than+X11