You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Language-based issue is raised in the comments of issue #8.
It appears the input to KeyboardSimulator functions are converted to codes based on the fixed table in keyboard_value.R. For example keybd.press(), in main.R, does some cleaning and parsing of the string of buttons, which is then used as a lookup for keyboard_value. The virtual key code and scan code are ultimately pass to the Windows API C++ function keybd_event() in press.cpp.
The main problem is the scan code always being the same as this is hardware-dependent. It would be good to just use the hardware-independent virtual key code.
Possible solution
I didn't think I'd be looking at the Windows API but here we are. The mapVirtualKey family provides a way to convert from scan codes to virtual key codes. sendInput supersedes keybd_event and can send an input based on a virtual key code. It would be good to have KeyboardSimulator updated with these, but could potentially be implemented in rstudiovim.
The text was updated successfully, but these errors were encountered:
Issue in rstudiovim
Key presses are simulated incorrectly based on keyboard layout. Trying to add a command like:
What gets types instead is
Looks like my en-UK layout is being converted to an en-US layout.
Investigating in KeyboardSimulator dependency.
Language-based issue is raised in the comments of issue #8.
It appears the input to KeyboardSimulator functions are converted to codes based on the fixed table in keyboard_value.R. For example
keybd.press()
, in main.R, does some cleaning and parsing of the string of buttons, which is then used as a lookup forkeyboard_value
. The virtual key code and scan code are ultimately pass to the Windows API C++ functionkeybd_event()
in press.cpp.The main problem is the scan code always being the same as this is hardware-dependent. It would be good to just use the hardware-independent virtual key code.
Possible solution
I didn't think I'd be looking at the Windows API but here we are. The mapVirtualKey family provides a way to convert from scan codes to virtual key codes. sendInput supersedes keybd_event and can send an input based on a virtual key code. It would be good to have KeyboardSimulator updated with these, but could potentially be implemented in rstudiovim.
The text was updated successfully, but these errors were encountered: