2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00
Commit Graph

13 Commits

Author SHA1 Message Date
Frans de Jonge
c01a9fd213
[i18n] Remove stray newline from ExternalKeyboard string (#9890) 2022-12-11 10:15:38 +01:00
NiLuJe
779a8e00de ExternalKeyboard: Harden the debugfs check
* Don't even attempt to run mount if we're not root (e.g., emu or PB)
* Deal with sane init systems that mount debugfs as debugfs and not none
  (e.g., Kindle).

Also, switch to debug logging for those errors, pluginloader is already
verbose enough.

Fix #9774
2022-11-13 06:47:13 +01:00
NiLuJe
6f29b48587 ExternalKeyboards: Drop the startup FM workaround
Unnecessary since 2db294d0b7,
as the delayed event takes care of our problem ;).
2022-11-09 00:20:12 +01:00
NiLuJe
4a355f789d ExternalKeyboard: Add a note about the special drivers sysfs knob
Just so that I don't forget about it entirely, as I haven't had to use
it so far...
2022-11-02 03:48:39 +01:00
NiLuJe
8e31bc8a68 ExternalKeyboard: Simplify the menu shenanigans
checked_func implies keep_menu_open anyway
2022-11-02 03:48:39 +01:00
NiLuJe
d585cd5d86 ExternalKeyboard: Don't keep the menu open on toggle, the event cascade
may reinit stuff and close it anyway.
2022-11-02 03:48:39 +01:00
NiLuJe
2db294d0b7 ExternalKeyboard: Debounce the Connected/Disconnected events
Until we find a way to fine-tune the evdev device parsing, we'll often
have at least two devices per keyboard, but we only need a single event
;).
2022-11-02 03:48:39 +01:00
NiLuJe
5a939553fc ExternalKeyboard: Flip the hasKeys Device cap, too
This allows navigation to work as expected ;).
2022-11-02 03:48:39 +01:00
NiLuJe
53c0a65a5b ExternalKeyboard: Don't spam the "Keyboard connected" InfoMessage
Only show it for the first keyboard
2022-11-02 03:48:39 +01:00
NiLuJe
5b6d2ab66f ExternalKeyboard: Workaround bad interaction with coverbrowser when
enabled on startup
2022-11-02 03:48:39 +01:00
NiLuJe
02020176a9 ExternalKeyboard: Only disable OTG on exit
We currently did so on plugin destruction, which was a bit
overkill/annoying, as plugin instances are torn down on view
changes (i.e., when FileManager/ReaderUI are torn down) ;).
2022-11-02 03:48:39 +01:00
NiLuJe
9863a9c0bb ExternalKeyboard: Use the evdev number passed along by base to avoid sweeping the full list of input devices
This required some... creative thinking to avoid complexifying common
Input/UIManager codepaths ;p.
2022-11-02 03:48:39 +01:00
Borys Lykah
9b2201a438
Initial hotpluggable keyboard handling (#9540)
* Added a new plugin external-keyboard. It listens to USB events. When keyboard is plugged in or plugged out, it updates device and input configuration accordingly.
* Added new fake events UsbDevicePlugIn and UsbDevicePlugOut that are emitted when a device is connected to a book reader that plays the role of USB host. The usage of the existing events UsbPlugIn and UsbPlugOut has not changed - they are used when a reader is connected to a host. The koreader-base has a related PR for those events.
* Did a small refactoring of initialization for the modules FocusManager and InputText. They check device keyboard capabilities on their when the module is first loaded and store it. Some of the initialization code has been extracted into functions, so that we can re-initialize them when keyboard is (dis)connected.
* Initial implementation centered around text input, and tested with USB keyboards on devices with OTG support.
* Said OTG shenanigans are so far supported on devices with debugfs & the chipidea driver, or sunxi devices.
2022-10-29 22:46:35 +02:00