mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
map the center key to "fire"
This allows the center key to be used as a UI trigger action without creating a carriage return on the console. this prevents console actions from errantly triggering during complex ui navs. probably later on we should filter out more of the UI nav items going to the console because the console is always listening
This commit is contained in:
parent
7631ad9e20
commit
6918e275d0
1 changed files with 4 additions and 0 deletions
|
|
@ -132,6 +132,10 @@ fn map_keypress(kp: KeyPress) -> char {
|
|||
KeyPress::Left => '←',
|
||||
KeyPress::Right => '→',
|
||||
KeyPress::Select => '∴',
|
||||
// "Fire" is used as the mapping for the center instead of carriage return ('\r' (0xd))
|
||||
// because carriage return is reserved for the shell to indicate the end of line. Thus
|
||||
// by mapping "fire" to the center key, we get a UI-specific action key without invoking
|
||||
// shell commands in the background unintentionally.
|
||||
KeyPress::Center => '🔥',
|
||||
_ => '\u{0000}',
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue