Skip to content

Virtual keyboard: add a setting to disable swipes #11066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

hius07
Copy link
Member

@hius07 hius07 commented Nov 2, 2023

Default to enable. Fixes #10976.

1

Cleanup.


This change is Reviewable

@Frenzie Frenzie added this to the 2023.11 milestone Nov 2, 2023
Device:performHapticFeedback("KEYBOARD_TAP")
if self.flash_keyboard and not self.skipswipe then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iirc that's intended for internal use (like on the shift key), regardless whether it's fully hooked up at this time. Basically see

if self.keyboard.symbolmode_keys[self.label] ~= nil then
self.callback = function () self.keyboard:setLayer("Sym") end
self.skiptap = true

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But removing it is probably fine given it hasn't served any purpose the past x years.

@poire-z
Copy link
Contributor

poire-z commented Nov 2, 2023

The rest (95% :)) of changes in menu_keyboard_layout.lua is just refactoring, no UI/feature change, right?

@hius07
Copy link
Member Author

hius07 commented Nov 2, 2023

Minor UI changes:
-"layout-specific settings" goes up into the "layout" group
-"Keyboard appearance settings" - they are about the keyboard exterior

The main refactoring is: to iterate over both an array and a hash-table, I've changed "FFIUtil.orderedPairs + util.arrayContains" to "ipairs + table.sort(array)".
(The hash-table has 24 entries, the array - not more than 4)

Copy link
Contributor

@poire-z poire-z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ ok, not gonna follow all this, trusting you :)

@NiLuJe
Copy link
Member

NiLuJe commented Nov 2, 2023

"ipairs + table.sort(array)".

Haven't checked the code, but I assume you meant table.sort(hash), otherwise I'm missing something obvious?

EDIT: Okay, there aren't really any hashes directly involved anymore, just a hit check in the array loop.

TL;DR: Looks sound at a glance ;).

@hius07
Copy link
Member Author

hius07 commented Nov 2, 2023

Haven't checked the code, but I assume you meant table.sort(hash), otherwise I'm missing something obvious?

Array (active layouts) is not sorted alphabetically.

@Frenzie Frenzie merged commit 4391267 into koreader:master Nov 2, 2023
@hius07 hius07 deleted the kbd-disable-swipes branch November 3, 2023 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fast typing triggers umlaut
4 participants