PatchworkOS
3984a1d
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
ps2_scanmap.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
stdbool.h
>
4
#include <
stdint.h
>
5
#include <
sys/kbd.h
>
6
7
/**
8
* @brief PS/2 Scanmap.
9
* @defgroup module_drivers_ps2_scanmap PS/2 Scanmap
10
* @ingroup modules_drivers_ps2
11
*
12
* @{
13
*/
14
15
/**
16
* @brief PS/2 scan code set to use
17
*/
18
#define PS2_SCAN_CODE_SET 2
19
20
/**
21
* @brief PS/2 scancode
22
*/
23
typedef
uint8_t
ps2_scancode_t
;
24
25
/**
26
* @brief Convert a PS/2 scancode to a generic keycode
27
*
28
* @param scancode PS/2 scancode structure
29
* @param isExtended Whether to use the extended scanmap
30
* @return Corresponding generic keycode
31
*/
32
keycode_t
ps2_scancode_to_keycode
(
ps2_scancode_t
scancode
,
bool
isExtended
);
33
34
/** @} */
y
int64_t y
Definition
main.c:153
keycode_t
keycode_t
Keyboard keycode type.
Definition
kbd.h:29
ps2_scancode_to_keycode
keycode_t ps2_scancode_to_keycode(ps2_scancode_t scancode, bool isExtended)
Convert a PS/2 scancode to a generic keycode.
Definition
ps2_scanmap.c:118
ps2_scancode_t
uint8_t ps2_scancode_t
PS/2 scancode.
Definition
ps2_scanmap.h:23
kbd.h
stdbool.h
stdint.h
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:11
src
modules
drivers
ps2
ps2_scanmap.h
Generated on Sat Jan 10 2026 00:03:16 for PatchworkOS by
1.9.8