core+platforms, revise pico pen handling

the MSB in the tablet position register denotes pen on surface.
add logic and a hotkey for handling pen not on surface. This allows
for repositioning of the pen without the storyware reacting to it.
This commit is contained in:
kub 2024-03-17 10:44:57 +01:00
parent 9f29605f55
commit c87e36d750
12 changed files with 127 additions and 70 deletions

View file

@ -28,8 +28,9 @@
#define PEVB_PICO_PNEXT 21
#define PEVB_PICO_PPREV 20
#define PEVB_PICO_SWINP 19
#define PEVB_PICO_PEN 18
#define PEVB_RESET 17
#define PEVB_PICO_SHPEN 18
#define PEVB_PICO_PPOSV 17
#define PEVB_RESET 16
#define PEV_VOL_DOWN (1 << PEVB_VOL_DOWN)
#define PEV_VOL_UP (1 << PEVB_VOL_UP)
@ -43,9 +44,10 @@
#define PEV_PICO_PNEXT (1 << PEVB_PICO_PNEXT)
#define PEV_PICO_PPREV (1 << PEVB_PICO_PPREV)
#define PEV_PICO_SWINP (1 << PEVB_PICO_SWINP)
#define PEV_PICO_PEN (1 << PEVB_PICO_PEN)
#define PEV_PICO_SHPEN (1 << PEVB_PICO_SHPEN)
#define PEV_PICO_PPOSV (1 << PEVB_PICO_PPOSV)
#define PEV_RESET (1 << PEVB_RESET)
#define PEV_MASK 0x7ffe0000
#define PEV_MASK 0x7fff0000
#endif /* INCLUDE_c48097f3ff2a6a9af1cce8fd7a9b3f0c */