main/unl0kr: add workaround to fix fast typing bug (MR 4642)
[ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
b2e75201b4
commit
0aa9524204
2 changed files with 51 additions and 2 deletions
|
@ -0,0 +1,43 @@
|
|||
Patch https://github.com/calebccff/lv_drivers/pull/5, to be integrated
|
||||
properly into lv_drivers.git / unl0kr upstream. Add it as separate patch
|
||||
for now as this is a workaround for the very annoying "can't type fast"
|
||||
bug and it's v23.12 release day.
|
||||
|
||||
From 36d981a7d4dff6d288c4294cf0763d7c642a2bff Mon Sep 17 00:00:00 2001
|
||||
From: jane400 <pmos@j4ne.de>
|
||||
Date: Sat, 16 Dec 2023 20:38:33 +0100
|
||||
Subject: [PATCH] libinput: release keyboard keys in lvgl directly after
|
||||
pressing
|
||||
|
||||
This enables fast typing on hardware keyboards as keys are no longer forgotten.
|
||||
---
|
||||
indev/libinput.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/indev/libinput.c b/indev/libinput.c
|
||||
index a78419f..0f63a58 100644
|
||||
--- a/indev/libinput.c
|
||||
+++ b/indev/libinput.c
|
||||
@@ -677,6 +677,19 @@ static void read_keypad(libinput_drv_state_t *state, struct libinput_event *even
|
||||
if (evt->key_val != 0) {
|
||||
/* Only record button state when actual output is produced to prevent widgets from refreshing */
|
||||
evt->pressed = (key_state == LIBINPUT_KEY_STATE_RELEASED) ? LV_INDEV_STATE_REL : LV_INDEV_STATE_PR;
|
||||
+
|
||||
+ // just release the key immediatly after it got pressed.
|
||||
+ // but don't handle special keys where holding a key makes sense
|
||||
+ if (evt->key_val != LV_KEY_BACKSPACE &&
|
||||
+ evt->key_val != LV_KEY_UP &&
|
||||
+ evt->key_val != LV_KEY_LEFT &&
|
||||
+ evt->key_val != LV_KEY_RIGHT &&
|
||||
+ evt->key_val != LV_KEY_DOWN &&
|
||||
+ key_state == LIBINPUT_KEY_STATE_PRESSED) {
|
||||
+ libinput_lv_event_t *release_evt = new_event(state);
|
||||
+ release_evt->pressed = LV_INDEV_STATE_REL;
|
||||
+ release_evt->key_val = evt->key_val;
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
default:
|
||||
--
|
||||
2.43.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Maintainer: Johannes Marbach <n0-0ne+gitlab@mailbox.org>
|
||||
pkgname=unl0kr
|
||||
pkgver=2.0.2
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
_commit_lvgl=2f294aa76c8fece98a4fa72304bc6f267ed2a228
|
||||
_commit_lv_drivers=7e3135bcae37cbd03c2f003fcc96278671bd8632
|
||||
_commit_squeek2lvgl=b67685dfede0771d2a237e1d8d4e784fcf406a70
|
||||
|
@ -34,6 +34,7 @@ source="
|
|||
unl0kr.files
|
||||
unlock.sh
|
||||
30-unl0kr-test.sh
|
||||
0001-libinput-release-keyboard-keys-in-lvgl-directly-afte.patch
|
||||
"
|
||||
options="!check" # No tests
|
||||
provides="postmarketos-fde-unlocker"
|
||||
|
@ -41,11 +42,15 @@ provider_priority=1000
|
|||
subpackages="$pkgname-doc $pkgname-pmtest"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
cd "$builddir"
|
||||
mkdir -p lvgl lv_drivers squeek2lvgl
|
||||
mv "$srcdir"/lvgl-"$_commit_lvgl"/* lvgl
|
||||
mv "$srcdir"/lv_drivers-"$_commit_lv_drivers"/* lv_drivers
|
||||
mv "$srcdir"/squeek2lvgl-"$_commit_squeek2lvgl"/* squeek2lvgl
|
||||
|
||||
cd lv_drivers
|
||||
patch -p1 < "$srcdir"/0001-libinput-release-keyboard-keys-in-lvgl-directly-afte.patch
|
||||
cd -
|
||||
}
|
||||
|
||||
build() {
|
||||
|
@ -95,4 +100,5 @@ fbc71bb804d5b766cd515533afd4f44092ffa023b248ac447b743618fa700a95bca8f9aa2ff20b03
|
|||
521379c06843d31304c7317d083472bb0105da7e9360d7a303cb98c84112919278fa8b50c3781d9cf43bb057b7eb7d52a4f4d900be69a0c0d70f97f2e9843140 unl0kr.files
|
||||
5386f434cd4f1fb9e0d561a8689e5e85d6a8b3c562823122c082d4932d2fb0ad4edcd635f14f0c61e5c8b5e53648c9937b042409c21683007700faea8894c750 unlock.sh
|
||||
407180b49c1a05f12bd6ee6e59dca0a6e74fe7b01f195087dcf2865598c47827d0bb569afdba55defa2f9a16437230fa62aa64f35111508b906bcbf9537acba4 30-unl0kr-test.sh
|
||||
85fbe5bb9ed18a21abc4215b90e4f92f924d81ba4686222c3fe817257f11b75b6ecbca701e75e3ea5cfb481a2c15445b93732fca35e905acc501ef565630bf3a 0001-libinput-release-keyboard-keys-in-lvgl-directly-afte.patch
|
||||
"
|
||||
|
|
Loading…
Reference in a new issue