Skip to main content

ascii_to_scancode

Function ascii_to_scancode 

Source
pub fn ascii_to_scancode(c: char, layout: KeyboardLayout) -> Option<(u8, bool)>
Expand description

シリアルコンソール用: ASCII 文字を物理スキャンコードと Shift 要否へ逆変換する。

alpha_char とレイアウトの ascii テーブルを総当たりで照合するため、 get_ascii の定義と常に一致する (テーブルを二重管理しない)。 戻り値 (make_scancode, needs_shift)。対応キーが無ければ None