layout selection: Fix emoji and number
This commit is contained in:
@ -80,7 +80,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[
|
||||
("us+dvorak_wide", include_str!("../data/keyboards/us+dvorak_wide.yaml")),
|
||||
|
||||
// Others
|
||||
("number", include_str!("../data/keyboards/number.yaml")),
|
||||
("number/us", include_str!("../data/keyboards/number/us.yaml")),
|
||||
|
||||
// Terminal
|
||||
("terminal/fr", include_str!("../data/keyboards/terminal/fr.yaml")),
|
||||
@ -89,7 +89,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[
|
||||
("terminal/us_wide", include_str!("../data/keyboards/terminal/us_wide.yaml")),
|
||||
|
||||
// Overlays
|
||||
("emoji", include_str!("../data/keyboards/emoji.yaml")),
|
||||
("emoji/us", include_str!("../data/keyboards/emoji/us.yaml")),
|
||||
];
|
||||
|
||||
pub fn get_keyboard(needle: &str) -> Option<&'static str> {
|
||||
@ -108,6 +108,7 @@ pub fn get_keyboard(needle: &str) -> Option<&'static str> {
|
||||
|
||||
const OVERLAY_NAMES: &[*const str] = &[
|
||||
"emoji",
|
||||
"terminal",
|
||||
];
|
||||
|
||||
pub fn get_overlays() -> Vec<&'static str> {
|
||||
@ -171,7 +172,7 @@ mod test {
|
||||
#[test]
|
||||
fn check_overlays_present() {
|
||||
for name in get_overlays() {
|
||||
assert!(get_keyboard(name).is_some());
|
||||
assert!(get_keyboard(&format!("{}/us", name)).is_some());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -91,11 +91,11 @@ foreach layout : [
|
||||
'terminal/us_wide',
|
||||
|
||||
# Block: Not languages.
|
||||
'emoji',
|
||||
'number',
|
||||
'emoji/us',
|
||||
'number/us',
|
||||
]
|
||||
extra = []
|
||||
if layout == 'emoji'
|
||||
if layout.startswith('emoji/')
|
||||
extra += ['allow_missing_return']
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user