proc is_shift_down {} {expr {!!([twapi::GetAsyncKeyState 0x10] & 0x8000)}}>
On 7/31/2024 9:47 PM, Ashok wrote:
proc is_shift_down {} {expr {!!([twapi::GetAsyncKeyState 0x10] & 0x8000)}}>
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
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 970 |
Nodes: | 10 (2 / 8) |
Uptime: | 104:58:39 |
Calls: | 12,740 |
Calls today: | 2 |
Files: | 186,574 |
Messages: | 3,171,677 |