mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 05:21:49 +03:00
[console] Add facility for rudimentary keyboard mapping
Allow for remapping of ASCII characters returned by the BIOS, using a map consisting of (from,to) pairs. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
30
src/include/ipxe/keymap.h
Normal file
30
src/include/ipxe/keymap.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef _IPXE_KEYMAP_H
|
||||
#define _IPXE_KEYMAP_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* Keyboard mappings
|
||||
*
|
||||
*/
|
||||
|
||||
FILE_LICENCE ( GPL2_OR_LATER );
|
||||
|
||||
#include <stdint.h>
|
||||
#include <ipxe/tables.h>
|
||||
|
||||
/** A keyboard mapping */
|
||||
struct key_mapping {
|
||||
/** Character read from keyboard */
|
||||
uint8_t from;
|
||||
/** Character to be used instead */
|
||||
uint8_t to;
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** Keyboard mapping table */
|
||||
#define KEYMAP __table ( struct key_mapping, "keymap" )
|
||||
|
||||
/** Define a keyboard mapping */
|
||||
#define __keymap __table_entry ( KEYMAP, 01 )
|
||||
|
||||
#endif /* _IPXE_KEYMAP_H */
|
||||
Reference in New Issue
Block a user