Compare commits

..

3 Commits

Author SHA1 Message Date
579ba8ab87 Release 1.3.2 2019-11-26 15:38:32 +00:00
5a262242a3 keymap: Work around sending keycode 0
If keycode 0 resolves to a letter, the the press is ignored by the compositor. This works around the bug.
2019-11-26 15:35:22 +00:00
bb18e60754 Merge branch 'release1' into 'master'
Release 1.3.1

See merge request Librem5/squeekboard!265
2019-11-20 22:24:02 +00:00
3 changed files with 11 additions and 3 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
squeekboard (1.3.2) amber-phone; urgency=medium
* Make sure all key presses get accepted by the compositor
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Tue, 26 Nov 2019 15:36:27 +0000
squeekboard (1.3.1) amber-phone; urgency=medium squeekboard (1.3.1) amber-phone; urgency=medium
* Update and fix layouts and languages * Update and fix layouts and languages

View File

@ -1,7 +1,7 @@
project( project(
'squeekboard', 'squeekboard',
'c', 'rust', 'c', 'rust',
version: '1.3.1', version: '1.3.2',
license: 'GPLv3', license: 'GPLv3',
meson_version: '>=0.51.0', meson_version: '>=0.51.0',
default_options: [ default_options: [

View File

@ -51,14 +51,16 @@ pub struct KeyState {
pub action: Action, pub action: Action,
} }
/// 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,
/// which the compositor likes to discard
pub fn generate_keycodes<'a, C: IntoIterator<Item=&'a str>>( 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() key_names.into_iter()
.map(|name| String::from(name)) .map(|name| String::from(name))
.zip(8..) .zip(9..)
) )
} }