Skip to content

stdlib/scancodeView source ↗

scancode

10 items · generated by scribe fromstdlib/scancode.fd· synced 2026-11-15

stdlib/scancode10 items

Contents

sc_is_make

Key press (make) when the byte’s high bit is clear.

pub fn sc_is_make(code: i64) -> bool {

Parameters:

  • code: i64

Returns: bool

Defined at line 7


sc_base

The scancode without its break bit.

pub fn sc_base(code: i64) -> i64 {

Parameters:

  • code: i64

Returns: i64

Defined at line 11


SC_LSHIFT

pub fn SC_LSHIFT() -> i64 {

Returns: i64

Defined at line 16


SC_RSHIFT

pub fn SC_RSHIFT() -> i64 {

Returns: i64

Defined at line 19


SC_LCTRL

pub fn SC_LCTRL() -> i64 {

Returns: i64

Defined at line 22


SC_CAPS

pub fn SC_CAPS() -> i64 {

Returns: i64

Defined at line 25


SC_MAP:

pub const SC_MAP: [i64; 84] = [0, 27, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 45, 61, 8, 9, 113, 119, 101, 114, 116, 121, 117, 105, 111, 112, 91, 93, 10, 0, 97, 115, 100, 102, 103, 104, 106, 107, 108, 59, 39, 96, 0, 92, 122, 120, 99, 118, 98, 110, 109, 44, 46, 47, 0, 42, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, 57, 45, 52, 53, 54, 43, 49, 50, 51, 48, 46]; pub const SC_MAP_SHIFT: [i64; 84] = [0, 27, 33, 64, 35, 36, 37, 94, 38, 42, 40, 41, 95, 43, 8, 9, 81, 87, 69, 82, 84, 89, 85, 73, 79, 80, 123, 125, 10, 0, 65, 83, 68, 70, 71, 72, 74, 75, 76, 58, 34, 126, 0, 124, 90, 88, 67, 86, 66, 78, 77, 60, 62, 63, 0, 42, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, 57, 45, 52, 53, 54, 43, 49, 50, 51, 48, 46];

Defined at line 31


sc_ascii

ASCII for a base scancode with current shift state, or 0 when the key is unmapped / non-printable. Caps lock handled by the caller: letters only.

pub fn sc_ascii(code: i64, shifted: bool) -> i64 {

Parameters:

  • code: i64
  • shifted: bool

Returns: i64

Defined at line 35


sc_mod_update

Update the modifier state from a scancode byte. state bit0=shift, bit1=caps. Returns the new state.

pub fn sc_mod_update(code: i64, state: i64) -> i64 {

Parameters:

  • code: i64
  • state: i64

Returns: i64

Defined at line 48


sc_key_char

ASCII for a make-code honouring shift AND caps (caps flips letters).

pub fn sc_key_char(code: i64, state: i64) -> i64 {

Parameters:

  • code: i64
  • state: i64

Returns: i64

Defined at line 65


Generated by scribe, the Fides documentation generator