registering global hotkeys fails with numbers and symbols

17 views
Skip to first unread message

Nathan smith

unread,
Mar 21, 2022, 7:18:14 AM3/21/22
to wxpytho...@googlegroups.com
Hi there,


I was wondering if this is a bug at my end (probably) or if this is a
genuine limitation of windows in general. I've been attempting to bind a
keystroke to the control of control, shift, semicolon using
self.RegisterHotKey.


It returns True, however it doesn't actually do anything once pressed,
this is the same for if I bind it to anything from 0 to 9, or any
symbol, but letters work fine.

My bind statement is:

self.RegisterHotKey(self.kid, self.mods, self.semicolon)

Where self.kid is wx.Window.NewControlId(),

Where self.mods works fine because it works with letters,

and self.semicolon is 0x3b taken from
https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes


Thanks for any advice in advance,

Nathan

Tim Roberts

unread,
Mar 21, 2022, 1:42:25 PM3/21/22
to wxpytho...@googlegroups.com
Nathan smith wrote:
>
> and self.semicolon is 0x3b taken from
> https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

Where do you see semi-colon on that page?  What I see is that 0x3A to
0x40 are undefined.  For US keyboards, the ";:" key is VK_OEM_1, or 0xBA.

--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Reply all
Reply to author
Forward
0 new messages