Compare commits
10 Commits
unlists
...
squeekboar
| Author | SHA1 | Date | |
|---|---|---|---|
| 3af10285b7 | |||
| 53997abc46 | |||
| 34765be22e | |||
| 8b4c643d3e | |||
| 358b25c431 | |||
| 2749fdb686 | |||
| 8e7909e877 | |||
| afaacd3f68 | |||
| 6a164d8119 | |||
| 3ac4caa3b9 |
@ -4,6 +4,7 @@ version = "0.1.0"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "1.0.*"
|
bitflags = "1.0.*"
|
||||||
|
clap = "2.32.*"
|
||||||
maplit = "1.0.*"
|
maplit = "1.0.*"
|
||||||
regex = "1.1.*"
|
regex = "1.1.*"
|
||||||
serde = { version = "1.0.*", features = ["derive"] }
|
serde = { version = "1.0.*", features = ["derive"] }
|
||||||
|
|||||||
88
data/keyboards/de_wide.yaml
Normal file
88
data/keyboards/de_wide.yaml
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
# Maintained by: Mark Müller <markmueller86@gmail.com>
|
||||||
|
---
|
||||||
|
bounds: { x: 0, y: 1, width: 540, height: 168 }
|
||||||
|
|
||||||
|
outlines:
|
||||||
|
default:
|
||||||
|
bounds: { x: 0, y: 0, width: 48, height: 42 }
|
||||||
|
altline:
|
||||||
|
bounds: { x: 0, y: 0, width: 81, height: 42 }
|
||||||
|
wide:
|
||||||
|
bounds: { x: 0, y: 0, width: 108, height: 42 }
|
||||||
|
spaceline:
|
||||||
|
bounds: { x: 0, y: 0, width: 216, height: 42 }
|
||||||
|
special:
|
||||||
|
bounds: { x: 0, y: 0, width: 48, height: 42 }
|
||||||
|
|
||||||
|
views:
|
||||||
|
base:
|
||||||
|
- "q w e r t z u i o p ü"
|
||||||
|
- "a s d f g h j k l ö ä"
|
||||||
|
- "Shift_L y x c v b n m BackSpace"
|
||||||
|
- "show_numbers preferences space , . Return"
|
||||||
|
upper:
|
||||||
|
- "Q W E R T Z U I O P Ü"
|
||||||
|
- "A S D F G H J K L Ö Ä"
|
||||||
|
- "Shift_L Y X C V B N M BackSpace"
|
||||||
|
- "show_numbers preferences space ! ? Return"
|
||||||
|
numbers:
|
||||||
|
- "1 2 3 4 5 6 7 8 9 0"
|
||||||
|
- "@ # % & - _ + ( ) ß"
|
||||||
|
- "show_symbols , \" ' : = < > BackSpace"
|
||||||
|
- "show_letters preferences space , . Return"
|
||||||
|
symbols:
|
||||||
|
- "~ ` ´ · © ® ÷ × ¶"
|
||||||
|
- "€ £ $ ¥ ^ ° * { } |"
|
||||||
|
- "show_numbers \\ / § π τ [ ] BackSpace"
|
||||||
|
- "show_letters preferences space , . Return"
|
||||||
|
eschars:
|
||||||
|
- "ä è é ö ü Ä È É Ö Ü"
|
||||||
|
- "à â ê î ô À Â È Î Ô"
|
||||||
|
- "show_numbers « » ç Ç æ œ ß BackSpace"
|
||||||
|
- "show_letters preferences space „ “ Return"
|
||||||
|
|
||||||
|
buttons:
|
||||||
|
Shift_L:
|
||||||
|
action:
|
||||||
|
locking:
|
||||||
|
lock_view: "upper"
|
||||||
|
unlock_view: "base"
|
||||||
|
outline: "altline"
|
||||||
|
icon: "key-shift"
|
||||||
|
BackSpace:
|
||||||
|
outline: "altline"
|
||||||
|
icon: "edit-clear-symbolic"
|
||||||
|
keysym: "BackSpace"
|
||||||
|
preferences:
|
||||||
|
action: "show_prefs"
|
||||||
|
outline: "special"
|
||||||
|
icon: "keyboard-mode-symbolic"
|
||||||
|
show_numbers:
|
||||||
|
action:
|
||||||
|
set_view: "numbers"
|
||||||
|
outline: "altline"
|
||||||
|
label: "123"
|
||||||
|
show_letters:
|
||||||
|
action:
|
||||||
|
set_view: "base"
|
||||||
|
outline: "altline"
|
||||||
|
label: "abc"
|
||||||
|
show_symbols:
|
||||||
|
action:
|
||||||
|
set_view: "symbols"
|
||||||
|
outline: "altline"
|
||||||
|
label: "*/="
|
||||||
|
show_eschars:
|
||||||
|
action:
|
||||||
|
locking:
|
||||||
|
lock_view: "eschars"
|
||||||
|
unlock_view: "base"
|
||||||
|
outline: "altline"
|
||||||
|
label: "äÄ"
|
||||||
|
space:
|
||||||
|
outline: "spaceline"
|
||||||
|
text: " "
|
||||||
|
Return:
|
||||||
|
outline: "altline"
|
||||||
|
icon: "key-enter"
|
||||||
|
keysym: "Return"
|
||||||
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
|||||||
|
squeekboard (1.4.0) amber-phone; urgency=medium
|
||||||
|
|
||||||
|
* "text" property in layouts
|
||||||
|
* Adjusts to user's color scheme
|
||||||
|
|
||||||
|
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Mon, 02 Dec 2019 19:37:01 +0000
|
||||||
|
|
||||||
squeekboard (1.3.2) amber-phone; urgency=medium
|
squeekboard (1.3.2) amber-phone; urgency=medium
|
||||||
|
|
||||||
* Make sure all key presses get accepted by the compositor
|
* Make sure all key presses get accepted by the compositor
|
||||||
|
|||||||
1
debian/control
vendored
1
debian/control
vendored
@ -12,6 +12,7 @@ Build-Depends:
|
|||||||
libgtk-3-dev,
|
libgtk-3-dev,
|
||||||
libcroco3-dev,
|
libcroco3-dev,
|
||||||
librust-bitflags-1-dev (>= 1.0),
|
librust-bitflags-1-dev (>= 1.0),
|
||||||
|
librust-clap-2+default-dev (>= 2.32),
|
||||||
librust-gio+v2-44-dev,
|
librust-gio+v2-44-dev,
|
||||||
librust-glib+v2-44-dev,
|
librust-glib+v2-44-dev,
|
||||||
librust-glib-sys-dev,
|
librust-glib-sys-dev,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
project(
|
project(
|
||||||
'squeekboard',
|
'squeekboard',
|
||||||
'c', 'rust',
|
'c', 'rust',
|
||||||
version: '1.3.2',
|
version: '1.4.0',
|
||||||
license: 'GPLv3',
|
license: 'GPLv3',
|
||||||
meson_version: '>=0.51.0',
|
meson_version: '>=0.51.0',
|
||||||
default_options: [
|
default_options: [
|
||||||
|
|||||||
@ -1,8 +1,16 @@
|
|||||||
|
#[macro_use]
|
||||||
|
extern crate clap;
|
||||||
extern crate rs;
|
extern crate rs;
|
||||||
|
|
||||||
use rs::tests::check_layout_file;
|
use rs::tests::check_layout_file;
|
||||||
use std::env;
|
|
||||||
|
|
||||||
fn main() -> () {
|
fn main() -> () {
|
||||||
check_layout_file(env::args().nth(1).expect("No argument given").as_str());
|
let matches = clap_app!(test_layout =>
|
||||||
|
(name: "squeekboard-test-layout")
|
||||||
|
(about: "Test keyboard layout for errors. Returns OK or an error message containing further information.")
|
||||||
|
(@arg INPUT: +required "Yaml keyboard layout file to test")
|
||||||
|
).get_matches();
|
||||||
|
if check_layout_file(matches.value_of("INPUT").unwrap()) == () {
|
||||||
|
println!("Test result: OK");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,6 +51,15 @@ pub struct KeyState {
|
|||||||
pub action: Action,
|
pub action: Action,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Sorts an iterator by converting it to a Vector and back
|
||||||
|
fn sorted<'a, I: Iterator<Item=&'a str>>(
|
||||||
|
iter: I
|
||||||
|
) -> impl Iterator<Item=&'a str> {
|
||||||
|
let mut v: Vec<&'a str> = iter.collect();
|
||||||
|
v.sort();
|
||||||
|
v.into_iter()
|
||||||
|
}
|
||||||
|
|
||||||
/// Generates a mapping where each key gets a keycode, starting from ~~8~~
|
/// Generates a mapping where each key gets a keycode, starting from ~~8~~
|
||||||
/// HACK: starting from 9, because 8 results in keycode 0,
|
/// HACK: starting from 9, because 8 results in keycode 0,
|
||||||
/// which the compositor likes to discard
|
/// which the compositor likes to discard
|
||||||
@ -58,7 +67,8 @@ pub fn generate_keycodes<'a, C: IntoIterator<Item=&'a str>>(
|
|||||||
key_names: C
|
key_names: C
|
||||||
) -> HashMap<String, u32> {
|
) -> HashMap<String, u32> {
|
||||||
HashMap::from_iter(
|
HashMap::from_iter(
|
||||||
key_names.into_iter()
|
// sort to remove a source of indeterminism in keycode assignment
|
||||||
|
sorted(key_names.into_iter())
|
||||||
.map(|name| String::from(name))
|
.map(|name| String::from(name))
|
||||||
.zip(9..)
|
.zip(9..)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -13,6 +13,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[
|
|||||||
("us", include_str!("../data/keyboards/us.yaml")),
|
("us", include_str!("../data/keyboards/us.yaml")),
|
||||||
("us_wide", include_str!("../data/keyboards/us_wide.yaml")),
|
("us_wide", include_str!("../data/keyboards/us_wide.yaml")),
|
||||||
("de", include_str!("../data/keyboards/de.yaml")),
|
("de", include_str!("../data/keyboards/de.yaml")),
|
||||||
|
("de_wide", include_str!("../data/keyboards/de_wide.yaml")),
|
||||||
("el", include_str!("../data/keyboards/el.yaml")),
|
("el", include_str!("../data/keyboards/el.yaml")),
|
||||||
("es", include_str!("../data/keyboards/es.yaml")),
|
("es", include_str!("../data/keyboards/es.yaml")),
|
||||||
("fi", include_str!("../data/keyboards/fi.yaml")),
|
("fi", include_str!("../data/keyboards/fi.yaml")),
|
||||||
|
|||||||
@ -49,7 +49,7 @@ endforeach
|
|||||||
# and the need to call it manually
|
# and the need to call it manually
|
||||||
foreach layout : [
|
foreach layout : [
|
||||||
'us', 'us_wide',
|
'us', 'us_wide',
|
||||||
'de',
|
'de', 'de_wide',
|
||||||
'el',
|
'el',
|
||||||
'es',
|
'es',
|
||||||
'fi',
|
'fi',
|
||||||
|
|||||||
Reference in New Issue
Block a user