The externalkeyboard plugin was unconditionally disabled on Kindle
because it gates on Kobo-specific OTG sysfs paths (ci_hdrc.0/role,
usbc0/otg_role). However, the keyboard detection and hotplug handling
machinery (findAndSetupKeyboards, onEvdevInputInsert, setupKeyboard)
is already fully generic — it uses fbink_input which works on Kindle.
With the companion koreader-base patch adding a uevent listener to
input-kindle.h, EvdevInputInsert events now fire on Kindle when UHID
devices are created (e.g., by kindle-hid-passthrough). This patch
lets the plugin load on Kindle to handle those events.
Changes:
- Replace the OTG-only gate with a check that allows Kindle through
- Guard OTG role management (init, menu, onExit) behind has_otg_role
so it only runs on platforms with OTG sysfs knobs
- On Kindle init, scan for any keyboards already present
- Hide OTG menu items on Kindle (only show Help)
Kobo behavior is completely unchanged.
Closes: https://github.com/koreader/koreader/issues/14359
Send a metadata object (filename, title, authors) with progress sync
requests when the user opts in via a new 'Send document metadata' toggle
(default off). The metadata is silently ignored by the official sync
server but can be used by custom sync servers.
Closes#13810
Ref: #8764
The `input_ignore_gsensor` setting sets `handleGyroEv` to be `voidEv` which skips the rotation fix in case the user wants to ignore the GSensor settings.
While language names are grammatically written with a lowercase letter in standard Bulgarian sentences, UI/UX conventions dictate that isolated list items, buttons, and dropdown options should start with a capital letter.
The previous handling had two problems:
- current dir only appended if argc == 1
- multiple args passed as one to reader.lua
As a result:
- `bin/koreader -v -d` doesn't work (reader.lua sees it as one arg)
- `bin/koreader -d abc.epub` doesn't work either (for the same reason)
The fix is to go through args one by one and use `set -- …` to keep them
as an array of args (preserves white-space and avoid unintended
expansions that might happen if we attempted to do some eval trickery
instead).
Note that reader.lua doesn't currently handle multiple file/dir args, so
we could instead just look at the last arg and add pwd to that one.
Unfortunately doing this in POSIX sh isn't any simpler than processing
all args. :-)
(While at it, use `$PWD` which is required by POSIX to always be
present.)
Tested with bash 5.3.9, busybox 1.37.0 and dash 0.5.12.
Also: minor revamp of the setting handling by having
onToggleFloatingPunctuation() accepting nil/true/false/0/1
and being the sole manager of self.floating_punctuation.
Fixes 2 cases where we could get stuck in an exepected state:
- if onHold would get us nothing to act on, we would stay stuck
in "hold" state (until a next hold) and taps for page turn
would not work
- if text selection would get us some text (ie. some punctuation)
that would be stripped to an empty string, we would just not
do the lookup, but the selection would stay: best to do that
lookup and get a "no result" window, that when closed would
do the normal cleanup.
- don't truncate version (stop removing arguably the most important part)
- add `macos` to the name to avoid confusion with other artifacts
- add deployment target too