Commit Graph
40 Commits
Author SHA1 Message Date
LibretroAdmin cb20568114 input: a driver for the keyboard and mouse from plain Win32
"win32": the keyboard and the mouse from the window and the oldest
calls of the Windows API. Raw input needs Windows XP and DirectInput 8
needs DirectX 8; a build for Windows 95 or NT 4.0 had neither, so it
had the null input driver and could not be given a key.

- Keys. The window procedure sees every key go down and come up and
  already turns each into a scancode for the key events it sends. It
  tells this driver the same (win32_input_key_message(), one call
  where the scancode is worked out): a bit a scancode. The window can
  be the video thread's, so the bits are atomic words - set and
  cleared there, loaded at the poll - and nothing is locked. The
  frontend asks for the keys it has binds for once a poll
  (keys_down), as it does of the other keyboard drivers.
- Its key map (rarch_key_map_win32) is DirectInput's in numbers:
  scancodes, the extended keys with 0x80 added. No DirectX header.
- Mouse. Where the cursor is in the window at each poll, and its left,
  right and middle buttons (GetAsyncKeyState(), the two swapped where
  the user has them swapped), published for the frontend to answer the
  mouse, the pointer and the lightgun from.
- Only while the window is the foreground one. Without it nothing is
  down, and a key held when the window lost the foreground is not down
  when it has it back.

What it does not have: a wheel, buttons four and five, motion past
the screen's edge (motion is how far the cursor went), a grab. And no
controllers - that is a joypad driver's, and the one for these
Windows, the multimedia library's joystick calls, is not written yet.

Built where HAVE_WIN32INPUT is defined (HAVE_WIN32INPUT=1), which
nothing turns on by default but the Visual C++ 6 project in the
commit after this. It is chosen by name, or where neither raw input
nor DirectInput is built or starts.

Run: the Windows build with it compiled in, under Wine, through the
scripted keyboard session - the core sees the same 63 lines with
"win32" as with "dinput", and DirectInput's own are the same as
before this. samples/input/win32_input runs the driver against a
real window under Wine: the key map both ways, keys down and up, an
extended key against the keypad key under it, the top bit of a word,
nothing down with another window in front, the mouse's place and
motion. Not run on a Windows machine, of any age.
2026-10-07 15:15:15 +02:00
LibretroAdmin f4ac9970fb gekko: USB keyboards on the Wii
Boot protocol HID keyboards on the Wii's USB ports type into the menu
and cores and drive the keyboard binds.  os/gekko finds them among the
HID devices IOS lists, sets the boot protocol and turns their reports
into connect, key and disconnect events; the gx input driver turns
those into key events and key state, US layout for characters.  The
HID pad driver leaves keyboards awake.  The USB HID usage key map is
shared with the Wii U as rarch_key_map_hid.
2026-10-03 22:58:07 +02:00
Rob Loach 8024e84c3f Add SDL3 video and input drivers 2026-08-03 05:30:30 +02:00
libretroadmin eb6f0c8dba Get rid of winraw_scancodes enums 2025-07-20 12:52:12 +02:00
LibretroAdmin 25546f864a Revert "Move code around"
This reverts commit a018f935d0.
2025-07-18 18:16:27 +02:00
LibretroAdmin a018f935d0 Move code around 2025-07-18 17:24:46 +02:00
LibretroAdmin c57c4fbd1a Style nits 2025-02-10 13:59:25 +01:00
LibretroAdmin 31b7812720 Function argument name standardization 2025-01-17 04:16:12 +01:00
nfore 9ca5c5e623 Revive/rewrite Keyboard Overlay and OSK Toggle
Add keyboard overlay preset, keyboard submenu, and osk_toggle hotkey. Use overlay caching for osk_toggle.

For now, keyboard menu has only preset path, auto-scale toggle, and opacity.

Related fixes:
- input_keyboard_event: Don't check hotkey binds when device is RETRO_DEVICE_POINTER
- Add input_keymaps_translate_rk_to_ascii() for correct character input to input_keyboard_event
- input_overlay_poll: Delay clearing INPUT_OVERLAY_BLOCKED flag until there is no overlay input (Avoids stray input after osk_toggle)
- Send keyboard events for modifiers before other keys (for correct modifier+key input if hitboxes overlap)
2023-07-09 04:42:49 +02:00
libretroadmin 31751a3945 Cleanups 2023-06-01 22:52:05 +02:00
libretroadmin c0ba738f0d Header uniformity - enums on top, then structs, then public declarations 2023-05-30 21:03:36 +02:00
OsirizX c6d51fdb32 [ORBIS] Initial changes for PS4 2022-05-21 16:31:10 +02:00
sonninnos ca311246b1 C89 buildfix 2021-08-24 22:32:47 +03:00
sonninnos 2c47d94bf5 (WINRAW) Change legacy virtual keys to scan codes 2021-08-04 19:23:56 +03:00
twinaphex cf02814fd4 Remove unused apple_key_name_map 2020-09-05 10:13:06 +02:00
rsn8887 28ef222886 [VITA] Bluetooth mouse and keyboard support 2019-03-22 21:32:59 -05:00
rsn8887 f943688dff [LIBNX] USB keyboard support 2019-03-19 08:43:46 -05:00
Toad King 1e212b4248 use emscripten HTML5 API for keyboard events instead of old JS library 2018-01-13 17:56:00 -06:00
gblues 6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
twinaphex 3d61c7fdfc MSVC buildfix 2017-06-06 23:19:07 +02:00
twinaphex 9ebfb36b4e Use rarch_keysym_lut directly 2017-06-06 05:17:25 +02:00
Zoran Vuckovic 1bc945e3dc Add Windows raw input driver 2017-05-18 18:48:41 +02:00
xhp-creations 4915f452f5 WiiU Initial Keyboard Support
WiiU Initial Keyboard Support
2017-02-09 12:34:12 -05:00
Brad Parker 83619b25e6 DOS: add keyboard driver to support non-joypad keys 2017-02-05 13:55:21 -05:00
twinaphex 96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
Josh Palmer 437734e407 Rewrite QNX input & joypad drivers for proper BB10.3.1 support 2017-01-09 20:26:09 +00:00
twinaphex 7ce2ac082a Use retro_common_api.h 2016-06-03 05:54:21 +02:00
twinaphex 4a7ab8366b Move libretro.h headers to libretro-common/include 2016-05-10 19:03:53 +02:00
Diablodiab afe8d2d617 Fixed two bugs in Android keyboard functionality and changed the way the keyboard
is registered (introduced an id_3 value)
2016-01-12 21:48:09 +01:00
twinaphex f374af9dbc Revert "Add keyboard input functionality to Android version"
This reverts commit 17bdb549d4.
2016-01-12 15:52:42 +01:00
Twinaphex db51b5a2c0 Merge pull request #2636 from diablodiab/android-keyboard-support
Add keyboard input functionality to Android version
2016-01-11 22:26:51 +01:00
Diablodiab 17bdb549d4 Add keyboard input functionality to Android version 2016-01-11 21:06:46 +01:00
twinaphex 347a18cb30 Update input headers 2016-01-10 04:33:01 +01:00
twinaphex bfef1c816f Cleanup 2015-12-06 16:32:08 +01:00
twinaphex 5ba14b45ce Change some header includes 2015-12-05 20:05:32 +01:00
Twinaphex f56cb5d8cb (Apple) Buildfixes 2015-11-17 06:30:11 +01:00
twinaphex 30d0e58bb9 (Apple) Move keymap to input_keymaps.c 2015-11-17 06:25:37 +01:00
twinaphex b61ae369f7 (input_keymaps.c) Namespace changes and documentation 2015-01-12 02:52:52 +01:00
twinaphex 453321c50b Start updating headers 2015-01-07 17:46:50 +01:00
twinaphex c6ac686e51 Split up input_common.c into input_common.c and input_keymaps.c 2014-10-27 04:27:48 +01:00