Commit 77827f57 authored by Karl Hobley's avatar Karl Hobley

Rename 'english' keymap to 'us'

This keyboard layout is only used in the United States, other
english-speaking countries may have their own standard keyboard layouts.

This commit changes the name of the 'english' layout to 'us' to match
X11.
parent b3849ddf
pub mod english { pub mod us {
static ENGLISH: [[char; 2]; 58] = [ static US: [[char; 2]; 58] = [
['\0', '\0'], ['\0', '\0'],
['\x1B', '\x1B'], ['\x1B', '\x1B'],
['1', '!'], ['1', '!'],
...@@ -61,7 +61,7 @@ pub mod english { ...@@ -61,7 +61,7 @@ pub mod english {
]; ];
pub fn get_char(scancode: u8, shift: bool) -> char { pub fn get_char(scancode: u8, shift: bool) -> char {
if let Some(c) = ENGLISH.get(scancode as usize) { if let Some(c) = US.get(scancode as usize) {
if shift { if shift {
c[1] c[1]
} else { } else {
......
...@@ -197,12 +197,12 @@ fn daemon(input: File) { ...@@ -197,12 +197,12 @@ fn daemon(input: File) {
let keymap = match env::args().skip(1).next() { let keymap = match env::args().skip(1).next() {
Some(k) => match k.to_lowercase().as_ref() { Some(k) => match k.to_lowercase().as_ref() {
"dvorak" => (keymap::dvorak::get_char), "dvorak" => (keymap::dvorak::get_char),
"english" => (keymap::english::get_char), "us" => (keymap::us::get_char),
"azerty" => (keymap::azerty::get_char), "azerty" => (keymap::azerty::get_char),
"bepo" => (keymap::bepo::get_char), "bepo" => (keymap::bepo::get_char),
&_ => (keymap::english::get_char) &_ => (keymap::us::get_char)
}, },
None => (keymap::english::get_char) None => (keymap::us::get_char)
}; };
let ps2d = Arc::new(RefCell::new(Ps2d::new(input, keymap))); let ps2d = Arc::new(RefCell::new(Ps2d::new(input, keymap)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment