Questions tagged [scancodes]

73 questions
4
votes
2 answers

Winapi - Extended Keyboard Scan Codes

If I wanted to simulate a keypress using an extended scan code like 0xE0 0x1D (for right CTRL), how would I simulate such a keypress in C? I've tried calling SendInput with two INPUT structs, but only the left CTRL key was "pressed". The same thing…
Mona the Monad
  • 2,265
  • 3
  • 19
  • 30
4
votes
1 answer

Get scan code from WM_CHAR message

How can I convert a character of any language that I catch via WM_CHAR in WndProc to a keyboard scan code? Like if the button pressed is x it would return 0x2d and etc.
Romka
  • 57
  • 6
3
votes
2 answers

Is it possible for a keyboard key to not generate a scancode?

I have recently moved to Linux full time, and am enjoying the learning curve. However, one particular thing has me stumped big time: Some of the Fn key combinations on my laptop are not working, spec. Volume up/down, Mute, etc. Combinations that are…
oczkoisse
  • 1,561
  • 3
  • 17
  • 31
3
votes
1 answer

Simulate multimedia key presses in Delphi

I need to simulate pressing of multimedia keys (such as play/pause, prev/next track, rewind/forward, etc.) in Delphi. I can simulate 'normal' keys easily using the next code: keybd_event(VK_SPACE,0, 0, 0); keybd_event(VK_SPACE,0, KEYEVENTF_KEYUP,…
user3558897
  • 113
  • 1
  • 8
3
votes
2 answers

What is the VK_KEY / scancode for this key?

I am using GetASyncKeyState (C++) to check for keys. I don't know what the name of this key is: How is this key named? What is the VK_ or Scancode?
user1182183
2
votes
2 answers

How to get special keys with BIOS interrupts

I'm writing a real mode OS in NASM, and I'm wondering if there is a way to read keys such as function keys, arrow keys, control, alt, and the like with BIOS interrupts? I appreciate any help you can provide.
2
votes
1 answer

Is there a method to use Sendkeys with Xinput?

Im trying to find a way send inputs to XINPUT buttons for a controller that is already plugged in. So the one python repo (vjoy/pygame) wouldn't work since it "adds" a controller. Does anyone know if this exist? For a similar comparison I am able to…
2
votes
0 answers

C++ (Windows): Convert a virtual key code string representation ("VK_F6") to hexadecimal (0x75)

Is there an elegant way in C++ (Windows) to take string representation of a virtual key code (e.g. VK_NUMPAD0, VK_F6, VK_INSERT, VK_RSHIFT, etc.) and convert it to its corresponding hexadecimal value (e.g. 0x60, 0x75, 0x2D, 0xA1, etc.)? Currently, I…
David
  • 121
  • 3
2
votes
0 answers

Strange scancode 02 2A (554) on SendInput LShift

I have written a program to use an external (wireless) numpad as an input device for gaming. I am using NUMPAD0, NUMPAD. and ENTER for the modifier keys shift, ctrl and alt respectively and I've keymapped the rest of the numpad keys to WASD and some…
luksen
  • 67
  • 5
2
votes
1 answer

How keystroke simulated in RPA Tools like Automation Anywhere

I'm curious to know how Top RPA tools like AA and UiPath simulate keystroke to the applications. I've built a application with use of Keybd_event to simulate keystrokes but i keep facing the issue of scan code parameter of keybd_event - as it…
nagarajannd
  • 715
  • 5
  • 11
2
votes
1 answer

How to find the scancode of an "unknown key" in Android?

I'm trying to do a little key remapping in Android 5.1 by creating custom keylayout files for my Bluetooth devices, however a few of my devices have keys that either don't do anything in Android (such as iOS specific keys on a keyboard) or get…
Ceetch
  • 177
  • 4
  • 17
2
votes
1 answer

How to convert VK scan codes to appropriate character for language selected

I have an application which is multilingual, and I have to convert the VK scan codes to the appropriate character as specified by the current keyboard layout provided that they are mapped to some character representation and not just an action,…
Adrian
  • 10,246
  • 4
  • 44
  • 110
2
votes
1 answer

How to convert X11 KeyCode or KeySym to scan code

I need to get scan codes of keyboard buttons (or any other codes) in layout-independent way. More specific, let's say I have QEditText and catching keystrokes from it. Now I'm starting to press a single button, and when the layout is English it has…
user2440074
2
votes
2 answers

HID reports/scan codes for iPhone's/iPad's home button

I'm creating a very simple Arduino BT keyboard for iOS using a RN-42-HID Bluetooth module. I've been able to connect to an iPad and send it a few HID reports. So far, I can make the cursor go left, right, up and down, as well as select a certain…
sabriel27
  • 21
  • 5
1
vote
2 answers

OS X Cocoa - Translate Virtual Scan Code to and from Char

Is there a cocoa / carbon equivalent to the VkKeyScan and ToUnicode functions present on windows for translating between virtual scan codes and a unicode string? I would also like to perform this conversion vice versa (going from a char to a scan…
cdyer
  • 1,220
  • 1
  • 12
  • 21