On devices with a physical keyboard (e.g. Kindle), the on-screen keyboard
can already be toggled while a text field is focused via Shift/ScreenKB +
Home. This adds a lone tap of the physical Sym key as an additional, more
natural trigger.
Sym is otherwise a held modifier for the symbol layer, and Input:handleKeyBoardEv
swallows a bare modifier press/release before it becomes a key event. Detect a
Sym press+release with no other key in between and surface it as a dedicated
"SymPress" key event, which InputText handles the same way as the existing
Shift/ScreenKB + Home toggle. The symbol layer (Sym+<key>) is unaffected: any
intervening key press clears the lone-tap state, so only a true solo tap fires.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- `Device:ping4()`: do not use `struct icmphdr` (Linux specific),
idem with `struct iphdr`, which also need to be declared
differently depending on endianness (due to bitfields)
- `Device:retrieveNetworkInfo()`: use new `ffi/netinfo` module
Adds 'Extra flash' setting that refreshes the cover image twice after
it is shown, reducing ghosting on affected devices (e.g. Kobo Libra 2).
Fixes#12950
Gives Hotkeys the ability to configure gamepads, at least to a degree. Advanced users might wish to use a shoulder button or a trigger as a modifier like in Tony Hawk or Devil May Cry. But in that case I suggest they might be advanced enough to make a follow-up PR as well. It's out of scope for this one anyway.
Things like deadzones might prefer to be independently configurable in the future, but then again it's a reader app.
Depends on <https://github.com/koreader/koreader-base/pull/2376>.
A PDF-controlled URL flowed into `os.execute` via single-quote
concatenation in `Device:openLink`. An embedded `'` in the URL closed
the intended quoting and the remainder was interpreted by the shell,
giving arbitrary command execution as the KOReader user once the user
chose "Open in browser" on an external link.
The same pattern existed in `doExternalDictLookup`'s command path:
the dictionary text was concatenated directly into the shell command
and `cleanSelection` does not remove shell metacharacters.
Use `util.shell_escape` at both sinks. The helper has been in the
codebase for years (used e.g. in `util.lua:928` for `df -kP`) and
quotes args with single quotes plus `'\''` escaping.
Fixes#15490
The viewport introduced in #11302 is a bit conservative and as a result, after opening KOReader menus, some artifacts remain on the right screen margin as black bars, which are disturbing.
Solution: Increase the viewport until no artifacts can be seen and also make sure book is not rendered behind the screen bezel.
If you have a Tolino device and have switched it into "Kobo mode" using the
developer options, the codename of the device is updated as well. This adds the
codenames for these devices to the device detection for Kobo devices.
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.
the firmware version of the PocketBook 623 does not provide NetMgrPing()
this leads to the application crashing after WiFi is activated and the
keepalive is scheduled
https://github.com/koreader/koreader/pull/14895 is a bit inefficient and does not take the option to lock the orientation in place.
This change reuses the existing functionality and in turn respects the other settings as well
Wrap LIPC calls in pcall() to prevent crashes when accessing Wi-Fi properties.
This PR adds error handling to five critical functions that interact with the Kindle's LIPC (Lab126 IPC) system for Wi-Fi management. Without proper error handling, these functions can crash KOReader when LIPC calls fail.
- prior to #14719, `$KOREADER_DIR` was not part of the environment,
so an update relying on it without a restart from the parent
launcher would crash KOReader on startup
- pocketbook: fix check (`koreader.app` is located in `$KOREADER_DIR/..`)
- remarkable: ensure `$KOREADER_DIR` remain correct after relocalization
The input device is autodetected by FBInk, which should hopefully mean we don't have to think about this again when it hits new devices ;).
(Supported devices were the PW6 & CS at time of writing)
Re #14461
Cache the result of `android.isColorScreen()` once and for all
(since the result is static). This fix a regression from #14505,
where `Device:hasColorScreen()` is called from a fork when the
file browser tries to generate covers, resulting in a crash:
```
… F reader.launche: thread.cc:1326] Check failed: FindStackTop() > reinterpret_cast<void*>(tlsPtr_.stack_end) …
```