Understanding how WebBrowserClient.SendKeyboardControls works #203
Answered
by
Voltstro
alex-turnbull
asked this question in
Q&A
-
As part of an AR/VR project I am creating a virtual keyboard as for interaction with the Web Browser.
Using this bit of crude code above I can send any respective 'command' inputs (Enter, backspace, etc) but struggle when it comes to inputting standard characters or symbols. How would I correctly send keyboard controls to work for characters and shift modifiers? |
Beta Was this translation helpful? Give feedback.
Answered by
Voltstro
Aug 4, 2023
Replies: 1 comment 1 reply
-
If you wanted to send Ctrl+A, you could do: WindowsKey[] downKey = new []{ WindowsKey.A | WindowsKey.Control };
WindowsKey[] upKey = Array.Empty<WindowsKey>();
char[] chars = Array.Empty<char>();
browserClient.SendKeyboardControls(downKey, upKey, chars); With capital letters you can just pass capital chars. WindowsKey[] downKey = Array.Empty<WindowsKey>();
WindowsKey[] upKey = Array.Empty<WindowsKey>();
char[] chars = new[] { 'A' };
browserClient.SendKeyboardControls(downKey, upKey, chars); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alex-turnbull
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you wanted to send Ctrl+A, you could do:
With capital letters you can just pass capital chars.