Add italian keyboard layout (it)
This commit is contained in:
committed by
Jeremy Soller
parent
cb12b31e9b
commit
6022bcc1e6
@@ -401,3 +401,78 @@ pub mod bepo {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod it {
|
||||
static IT: [[char; 2]; 58] = [
|
||||
['\0', '\0'],
|
||||
['\\', '|'],
|
||||
['1', '"'],
|
||||
['2', '£'],
|
||||
['3', '$'],
|
||||
['4', '%'],
|
||||
['5', '%'],
|
||||
['6', '&'],
|
||||
['7', '/'],
|
||||
['8', '('],
|
||||
['9', ')'],
|
||||
['0', '='],
|
||||
['?', '\''],
|
||||
['ì', '^'],
|
||||
['\x7F', '\x7F'],
|
||||
['\t', '\t'],
|
||||
['q', 'Q'],
|
||||
['w', 'W'],
|
||||
['e', 'E'],
|
||||
['r', 'R'],
|
||||
['t', 'T'],
|
||||
['y', 'Y'],
|
||||
['u', 'U'],
|
||||
['i', 'I'],
|
||||
['o', 'O'],
|
||||
['p', 'P'],
|
||||
['è', 'é'],
|
||||
['+', '*'],
|
||||
['\n', '\n'],
|
||||
['\0', '\0'],
|
||||
['a', 'A'],
|
||||
['s', 'S'],
|
||||
['d', 'D'],
|
||||
['f', 'F'],
|
||||
['g', 'G'],
|
||||
['h', 'H'],
|
||||
['j', 'J'],
|
||||
['k', 'K'],
|
||||
['l', 'L'],
|
||||
['ò', 'ç'],
|
||||
['à', '°'],
|
||||
['ù', '§'],
|
||||
['\0', '\0'],
|
||||
['<', '>'],
|
||||
['z', 'Z'],
|
||||
['x', 'X'],
|
||||
['c', 'C'],
|
||||
['v', 'V'],
|
||||
['b', 'B'],
|
||||
['n', 'N'],
|
||||
['m', 'M'],
|
||||
[',', ';'],
|
||||
['.', ':'],
|
||||
['-', '_'],
|
||||
['\0', '\0'],
|
||||
['\0', '\0'],
|
||||
['\0', '\0'],
|
||||
[' ', ' ']
|
||||
];
|
||||
|
||||
pub fn get_char(scancode: u8, shift: bool) -> char {
|
||||
if let Some(c) = IT.get(scancode as usize) {
|
||||
if shift {
|
||||
c[1]
|
||||
} else {
|
||||
c[0]
|
||||
}
|
||||
} else {
|
||||
'\0'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user