I'm attempting to remap a physical button on my laptop that triggers the auto-rotate toggle inside Windows 10. I know the keyboard shortcut for this Windows+O which would be #o in AutoHotKey.
With the following code snippet I can swap the autorotate key and volume down key (just an example).
#o::Volume_Down
Volume_Down::#o
But what is the underlying signal/keycode that Windows+O triggers, and can I trigger it with a keycode instead of with #o?
Turns out there is no keycode for this. It's a key combination: Win+O. The key on the side of the laptop simply sends Win+O.
I need to test keyboards keys so I created a virtual keyboard and light up keys when they are pressed>
On windows I get an issue, two key never send any signal : the print key & function key (located between the right alt gr and the right ctrl)
Also some key activate various signal when pressed (like turning on or off the sound...)
How can get a signal from these two keys with Qt ?
How can I override windows control over the keyboard during the test so that I will be the only one to receive keyboard input ?
I have a MacBook Pro (from 2015) and an external keyboard (DuckyZero 2108).
I have already swapped the modifier keys 'option/alt' and 'command' on the left side of my external keyboard to make it behave like my internal keyboard.
I have tried to map the 'fn' key, which is on the right side of my external keyboard, to 'option/alt' with KeyRemapFor4MacBook (karabiner) with no succes. Againt, to make sure that my external keyboard behaves like my internal keyboard.
It seems that the keys 'fn' and 'select' on my externel keyboard are not detected when pressed by my MacBook (checked this with Keyboard Viewer), thus mapping with KeyRemapFor4MacBook has no effect.
The 'fn' key works on hardware level and the 'select' key is detected by http://www.keyboardtester.com/tester.html (could not test the 'fn' key on keyboard.com due to the absence of the 'fn' key in their layout).
My question is, is it possible to make the 'fn' and/or 'select' key on my external keyboard respond/detect after being pressed, so that I can remap it to 'option/alt'?
So I'm currently using SendInput as a way of doing keyboard emulation. My problem is that to switch on the emulation the user has to hold down the CTRL button (client's specification :-( ).
I used GetAsyncKeyState(VK_CONTROL) to get the state of the CTRL key, so I can work out the switch part. My problem now is that since the physical CTRL button is pressed, it is not ignored when the SendInput function is used. So instead of emulating say the c button it emulates CTRL + c.
I'd like to know if there is a way for SendInput to ignore physical keyboard presses.
I have a keyboard event listener, and I am listening for the number pad key codes (1 through 9) for when number lock is activated; this works fine. However, in my app I also want to allow usage of a modifier key (CTRL) along with the number pad keys. The strange thing is that when holding CTRL, pressing 1 or 3 does not generate any keyboard event whatsoever, whereas 2 and 4 - 9 do generate the expected events. I have seen other references to this issue after some Googling, so I do not believe this is necessarily Flash-specific, but I have yet to find any answers.
I tried using SHIFT as a modifier, but that just results in generating the key codes from the number pad as if number lock was off (eg, SHIFT+Numpad1 returns the End keycode, regardless of number lock state) - apparently this is intentional Windows behavior. ALT is not an option with the numpad due to altcodes.
Any ideas on how to get CTRL+Numpad1 and CTRL+Numpad3 to generate the keyboard events? Or any explanation as to why they don't?
Edit: I tried out using these key combinations in Firefox as enriquein suggests below, and all the key combinations work A-OK, leading me to believe that this is likely a Flash-specific issue, or at least not a hardware issue.
I have run into issues in the past with numpad keys on specific keyboards. Various key combinations fail to register on specific keyboards, and it is possible that the keyboard you are using may just not be generating any event in that case. It's not guaranteed to work, but I would recommend trying out a different keyboard (different vendor, etc) and see if that works. It also might be an issue with localized keyboards, if you are using a non-english keyboard.
I'm almost certain it's not Flash related because I had similar problems with a localized keyboard and could not get it to generate events at all for certain keys or key combinations.
Try enumerating all key events and searching trough what they're mapped to, or google evtest.c, compile it and run it and see what it has to say.
Indeed it looks like its keyboard specific. I tried the key combinations as I read this question in Firefox and they triggered the same event as pressing Ctrl+Number (which is switch to tab #Number).
This was using a standard US/101-key english keyboard (no extra media buttons or anything).
Some keyboards don't register certain key combinations. I think that this is down to how they are put together. For example some may register left hand Ctrl + key combination but not right Ctrl + same key!
A work around would be to detect the key down and key up events for the Ctrl key.
You could then raise a custom event for Ctrl + numpad key or work with a volatile flag to show the Ctrl key state.