2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

45 Commits

Author SHA1 Message Date
Frans de Jonge
cfa73be940
[feat, Kobo] Implement shutdown from suspend (#5280)
This allows to shutdown straight from suspend just like Nickel.

Fixes <https://github.com/koreader/koreader/issues/2431>.
2019-08-29 22:02:08 +02:00
Frans de Jonge
9cd8e4a53a [chore] Work around weird LDoc bug
Using two `@fixme` tags directly following each other can result in a crash.

See <https://github.com/stevedonovan/LDoc/issues/314> for the upstream issue.
2019-08-25 11:44:43 +02:00
Frans de Jonge
59bb3ac8ea
[chore] Remove executable bit on device/input.lua (#5258)
I've got no idea why that might be there.
2019-08-25 11:43:56 +02:00
Frans de Jonge
a2dcfe9aec
[doc] Tag @todo, @fixme and @warning (#5244)
This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.

Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:

```sh
ldoc --tags todo,fixme *.lua
```

However, whether that particular usage offers any advantage over other search tools is questionable at best.

* and some random beautification
2019-08-23 19:53:53 +02:00
Martín Fernández
10456169e5
Android: ignore touchscreen by user request (using a hardware key) (#5164)
* android: ignore touchscreen by user request (using a hardware key)
2019-08-03 01:02:50 +02:00
NiLuJe
38e7975728
More robust Gyro toggle (#5104)
* Make toggling Gyro events more robust

Actually ask to turn it on/off depending on the setting, instead of a
blind toggle

A quick succession of suspend/resume events could otherwise leave it
in an unexpected state (i.e., off when it should have been on).
2019-07-01 17:12:24 +02:00
NiLuJe
81b255cb85 Better-than-nothing key repeat handling.
Mainly aimed at the Forma.
Still fairly terrible, as these things goes ;p.
2019-01-20 23:05:25 +01:00
poire-z
a245630422 Implement generic internal clipboard for all devices
Will allow copying selected text from a book to the TextEditor.
Will be overriden on devices that implement interactions with
the system clipboard.
2019-01-15 23:56:11 +01:00
NiLuJe
d113cb9475
A few Kobo input tweaks (#4450)
* Fix the Touch input probe on Trilogy devices that depend on the touch_probe_ev_epoch_time quirk (fix #630)
* Expose a "Pageturn button inversion" feature in the Navigation menu (for all devices with keys) (fix #4446)
* Allow ignoring the accelerometer on the Forma (Screen > Ignore accelerometer rotation events; also available from the Gesture Manager) (fix #4451)
* Fix SleepCover handling on the Forma (fix #4457)
* Make isWifiOn a tiny bit more accurate (check the actual WiFi module instead of sdio_wifi_pwr)
* Move all flash related Screen options to the eInk submenu
2019-01-08 02:59:47 +01:00
NiLuJe
f6743a45db
Proper Forma support (#4414)
* Enforce a known rotation on startup, to make sure we handle touch input coordinates properly.
* Proper FrontLight warmth support (thanks to @cairnsh & @pazos in #4291)!
* Fix the PageTurn buttons mapping to match Nickel's defaults
* Properly remap PageTurn buttons depending on the current rotation.
* Actually enable the Mk.7 screen refresh codepath on *all* Mk.7 devices (I'd messed up the device check...).
* Full accelerometer handling (includes a touch of refactoring regarding orientation handling in general).
* Fix insidiously broken USBMS behavior in Nickel after we exit on FW >4.8.

Fix #4291
Fix #3002
2018-12-28 04:32:42 +01:00
Martín Fernández
1e69fae7bc [feat] Add support for BQ/Fnac devices (#4294)
Adds support for devices found in https://blog.bq.com/es/bq-ereaders-developers-program/. Tested on BQ Cervantes 4 (last BQ device from 2017).

It adds a new touch input event handler (discussed in #4275) which should work on other single touch devices (ie: Kobo Touch, Mini, Glo, Aura HD) but wasn't tested.

Includes base bump with: [feat] Add BQ/Fnac device support (https://github.com/koreader/koreader-base/pull/745)
2018-10-31 23:48:36 +01:00
Frans de Jonge
b4002dc9ce
[chore] device/input: migrate custom event map to settings dir (#3822) 2018-04-03 20:28:37 +02:00
Frans de Jonge
086ced07f9
[feat, UX] SDL: add Gtk3 filechooser (#3827)
The specifics for other implementations are easy to change in the backend.
2018-04-03 20:03:56 +02:00
Frans de Jonge
7f4be45d4e
[chore] Handle SDL_MOUSEWHEEL and less hackish SDL events (#3826) 2018-04-03 14:56:28 +02:00
onde2rock
74a06d98a2 [chore] Code cleanup : deprecate the 'Enter' event, replaced with 'Press' (#3815)
'Escape' now do 'Back' on SDL
'Enter' now do 'Press' on SDL
2018-03-30 23:22:18 +02:00
cairnsh
8a5b888789 [refactor] Input: added Input:addSlotIfChanged() (#3716)
Changed handleTouchEv, handleTouchEvPhoenix to use that
2018-03-04 19:15:46 +01:00
cairnsh
f74f19bd9f [feat] Make touch work on the H2O2 (#3715) 2018-03-04 18:31:46 +01:00
Frans de Jonge
a39db783c0 [SDL] Add quit through regular window manager actions (#3206)
* [SDL] Add quit through regular window manager actions

Depends on https://github.com/koreader/koreader-base/pull/506

* proper exit and fix bug in restart function as a bonus
2017-09-11 21:37:00 +02:00
poire-z
3159548f3e Avoid warning on input timeout on the emulator 2017-08-19 16:30:43 +02:00
Qingping Hou
06562fa582 input(optimization): replace ev type reflection with table lookup 2017-03-06 07:47:20 +01:00
Qingping Hou
597beab616 minor: do not double log key input event 2017-03-06 07:47:20 +01:00
Qingping Hou
77b07255f0 chore: make input debug less verbose 2017-02-27 11:08:57 +01:00
Qingping Hou
f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 2017-01-02 19:52:09 -08:00
Qingping Hou
902403bf0a kobo(fix): prevent usb plug events from interrupting sleep 2016-09-21 23:32:56 -07:00
Qingping Hou
93b3262db7 kobo(fix): make sure sleep cover is not interrupting sleeping when ignore_power_sleepcover is set 2016-09-21 23:29:22 -07:00
chrox
7fd6037bb0 fix #2219
The ABS_PRESSURE ABS code is also detected on some KOBO devices
if ABS_PRESSURE events are feeded to handle orientation those devices
will have a unresponsive screen as described in #2219.

This patch registers an event adjustment handler for Kindle Oasis to
adjust the ABS_PRESSURE code to ABS_OASIS_ORIENTATION code so that
it won't affect event handling on other devices.
2016-08-13 18:57:15 +08:00
bingo619
8e28ef6251 Oasis orientation 2016-08-08 19:57:40 +10:00
bingo619
43797ed813 Oasis orientation 2016-08-02 19:43:16 +10:00
chrox
dee65a7999 add inactive touch zones around buttons on Kindle Voyage
This should fix #1801.
2016-07-01 23:47:32 +08:00
Qingping Hou
7d13d00eff uimanager(fix): honor second when calling Input:waitEvent 2016-06-22 01:11:23 -07:00
chrox
5983050d79 PDF free zoom mode revisit
this should implement feature request of zoom mode for multi-columns
page in #501
This PR depends on koreader/koreader-base#435

How to use?
1. Tap the top left corner of a PDF/Djvu page to get into the flipping
mode
2. Double-tap on text block will zoom in to that column
3. Double-tap on any area will zoom out to an overview of the page
4. repeat step 2 to focus to another page block

How does it work?
1. We first find the mask of text blocks in the page. (Pic 1)
2. Then we intersect page boxes with user tap to form a page block. (Pic 2)
3. Finally we zoom the page to the page block and center current view to
that block. (Pic 3)
2016-06-15 02:05:09 +08:00
Qingping Hou
82a3e0f9ad automatically adjust ev time for kobo touch 2016-05-23 23:21:14 -07:00
Cosmin Gorgovan
19338cb439 Kobo: Offer to power off if the power button is held for at least 3 seconds 2016-05-01 14:09:21 +01:00
Qingping Hou
eb37d9b8b6 kobo: fix screen probe for touch 2016-04-02 23:06:09 -07:00
Zijie He
b86aa5a02b Implement auto-suspend function for Kobo. Add test case for UIManager:_checkTasks, which should not clear _task_queue_dirty bit before looping. 2016-03-28 17:53:18 -07:00
Qingping Hou
e422842256 minor: a lot of luacheck fixes 2016-02-15 23:10:07 -08:00
Qingping Hou
5a3b9c6856 style: make staick-check happier 2016-01-31 15:08:24 -08:00
Guangda Hu
7491cd7b9d fix spaces 2015-05-15 21:57:00 -04:00
Guangda Hu
69db627136 Glo HD support 2015-05-15 17:46:16 -04:00
chrox
6894c11640 fix typo 2015-01-13 00:18:59 +08:00
chrox
1cba495fe0 add PocketBook port of Koreader 2015-01-13 00:15:18 +08:00
chrox
a5cff2c42b add user defined event map
This should fix #1016.

Usage for #1016:
Create a file named "custom.event.map.lua" in the koreader directory
with the following content:

return {
    [102] = "LPgFwd",
}
2014-11-06 15:02:06 +08:00
Qingping Hou
8927f901da fix(input): use elseif conditional logic in adjustTouchSwitchXY 2014-11-05 02:54:04 -05:00
Hans-Werner Hilse
64601ffe3b add wrapper for FFI input.open() 2014-11-04 09:56:04 +01:00
Hans-Werner Hilse
3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
2014-11-02 21:19:04 +01:00