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'?
Related
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 ?
Our MFC-based Windows application has functionality that depends on the state of the shift key. Shift exposes power-user menu commands and shift-dragging has different behavior than normal dragging. I am exploring our options in supporting Windows 8 tablets, and it seems that there is no straightforward way to detect the state of the Windows 8 soft keypad shift key.
Using GetAsyncKeyState(VK_SHIFT) (our current method) doesn't detect this key.
Experimenting with examining all incoming keyboard messages, I find:
A single isolated tap of the shift key produces no keyboard event
A double tap of the shift key produces a caps lock key event, indistinguishable from a normal caps lock key event
A single tap of the shift key followed by another keystroke (eg. the 'q' key) produces a shift key event, the keystroke, and a shift key (up?) event.
Are there any other ways I could try to detect the state of the soft keyboard shift key? Has anyone else had success detecting the state of this keypad on Windows 8 tablet soft keyboards.
The external keyboards that you plug into these devices all have normal behaving shift keys. The problem is specific to the soft keypad.
I want my program to press certain keys on my keyboard without me doing it physically.
So I need a subroutine that simulates pressing any key.
What code could I use to accomplish this (Press Any Key) in C++?
(I'm creating a program for MacOSX in Xcode)
Ok I got the mouse sorted now I just need key presses
You could use low-level event functions such as CGEventPost. At a higher level, look at the Accessibility APIs, such as AXUIElementPerformAction.
I use my command keys as extra control keys on Mac OS X (and I believe the space cadet keyboards had this configuration). I want to emulate this on my Windows machines by switching Alt to Ctrl and the Windows key to Alt within Emacs. Is this possible? I found this post which suggests something like
(setq w32-pass-lwindow-to-system nil
w32-pass-rwindow-to-system nil
w32-pass-apps-to-system nil
w32-lwindow-modifier 'super ;; Left Windows key
w32-rwindow-modifier 'super ;; Right Windows key
w32-apps-modifier 'hyper) ;; Menu key
to get super and hyper keys upon pressing the windows key. When I try to remap this to 'control to test it out (but eventually I want it to be meta and Alt as Ctrl, as mentioned), windows-e still gets intercepted by Windows (XP) and opens Explorer, but seems like a good place to start? I would appreciate any suggestions.
From the documentation for w32-pass-lwindow-to-system:
Note that some combinations of the left "Windows" key with other keys are
caught by Windows at low level, and so binding them in Emacs will have no
effect. For example, <lwindow>-r always pops up the Windows Run dialog,
<lwindow>-<Pause> pops up the "System Properties" dialog, etc. However, see
the doc string of `w32-phantom-key-code'.
From the documentation for w32-phantom-key-code:
Virtual key code used to generate "phantom" key presses.
Value is a number between 0 and 255.
Phantom key presses are generated in order to stop the system from
acting on "Windows" key events when `w32-pass-lwindow-to-system' or
`w32-pass-rwindow-to-system' is nil.
And as it also says on Xah's website:
There's no way around that unless you use other tools such as AutoHotkey. Even so, it may not be possible to disable 【Win+l】 (lock window) and 【Win+u】 (easy access).
So it seems that if it doesn't work with the method he describes (which seems right), you should look into AutoHotKey.