|
1 | 1 | #![allow(deprecated)] |
2 | 2 |
|
3 | 3 | mod generated_winput_to_hut { |
4 | | -//! https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input |
5 | | -//! |
6 | | -//! VK or virtual keys have both mouse and keyboard, and is windows specific, |
7 | | -//! have both VK_SHIFT (0x10), VK_LSHIFT (0xA0) and VK_RSHIFT (0xA1). |
8 | | -//! see also https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes |
9 | | -//! |
10 | | -//! Location or key position of AT101 is order (starting from 1) of keys on keyboard, regardless of language, |
11 | | -//! see also first picture at https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input#scan-codes |
12 | | -//! |
13 | | -//! Usage or HID Usage Table is tuple of (page, id), the page of keyboard is 0x07, |
14 | | -//! within Keyboard Page, |
15 | | -//! see also https://learn.microsoft.com/en-us/windows-hardware/drivers/hid/hid-usages |
16 | | -//! and https://usb.org/document-library/hid-usage-tables-16 |
17 | | -//! |
18 | | -//! Scancode or Scan 1 Make is regardless of layout, |
19 | | -//! see also HidP_TranslateUsagesToI8042ScanCodes |
20 | | -//! |
21 | | -//! e.g. |
22 | | -//! | | VK | AT101 | HID Usage | Scan 1 | |
23 | | -//! | ` (tilde) | VK_OEM_3 0xC0 192 | 1 | 0x0007 0x0035 | 0x0029 | |
24 | | -//! | 1 | VK_1 0x31 49 | 2 | 0x0007 0x001E | 0x0002 | |
25 | | -//! | Numpad1 | VK_NUMPAD1 0x61 97 | 93 | 0x0007 0x0059 | 0x004F | |
26 | | -//! | A | VK_A 0x41 65 | 31 | 0x0007 0x0004 | 0x001E | |
27 | | -//! | ENTER | VK_RETURN 0x0D 13 | 108 | 0x0007 0x0058 | 0xE01C | |
28 | | -//! | LSHIFT | VK_LSHIFT 0xA0 160 | 44 | 0x0007 0x00E1 | 0x002A | |
29 | | -//! | RSHIFT | VK_RSHIFT 0xA1 161 | 57 | 0x0007 0x00E5 | 0x0036 | |
30 | | -//! | SLEEP | VK_SLEEP 0x5F 95 | - | 0x0001 0x0082 | 0xE05F | |
31 | | -//! | PLAY | VK_PLAY 0xFA 250 | - | 0x000C 0x00CD | 0xE022 | |
32 | | -//! | SHIFT | VK_SHIFT 0x10 16 | - |
33 | | -//! | LBUTTON | VK_LBUTTON 0x01 1 | - |
| 4 | + mod mirror_to_hut_03 { |
| 5 | + use crate::mirror::winput::Vk; |
| 6 | + use crate::deps::hut_03::{AsUsage, Button, Consumer, GenericDesktop, KeyboardKeypad, Usage}; |
| 7 | + include!("generated.Winput_to_HUT.rs"); |
| 8 | + } |
34 | 9 |
|
35 | | - use crate::mirror::winput::Vk; |
36 | | - use crate::deps::hut::{AsUsage, Button, Consumer, GenericDesktop, KeyboardKeypad, Usage}; |
37 | | - include!("generated.Winput_to_HUT.rs"); |
| 10 | + mod mirror_to_hut_04 { |
| 11 | + use crate::mirror::winput::Vk; |
| 12 | + use crate::deps::hut_04::{AsUsage, Button, Consumer, GenericDesktop, KeyboardKeypad, Usage}; |
| 13 | + include!("generated.Winput_to_HUT.rs"); |
| 14 | + } |
38 | 15 | } |
39 | 16 |
|
40 | 17 | mod generated_winput_to_enigo { |
|
0 commit comments