We can now receive Meta key events, and other shortcuts like Alt+Tab.
Standard AOSP has no way to capture these, but it seems Samsung DeX
has a (secret?) method, which allows apps to request these events.
Fixes#37
During a recent profiling session, I noticed that we were generating a lot of
`Float` objects during event processing. This was due the way Kotlin implements
lambda return type, as implementation of generic `Function` interface. This
causes auto-boxing of dx & dy parameters for swipe actions.
Now we use an explicit functional interface for efficient code generation.
Delegating to lazy properties has no benefit here. It was originally intended to
speedup Dispatcher construction, by reducing allocation & avoiding prefs lookup.
But Lazy objects themselves have to be allocated, and we have to do an extra
indirection to retrieve actual values later. So, it was a pre-mature optimization,
entirely unnecessary here.
Currently translated at 65.5% (101 of 154 strings)
Added translation using Weblate (Norwegian Bokmål)
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Translate-URL: https://hosted.weblate.org/projects/avnc/app/nb_NO/
Translation: AVNC/App
- Re-organized code fragments for better readability & locality.
- Instead of having multiple gesture *End() functions, we now have a general
solution to end gestures, by automatically releasing mouse buttons.
- Simplify 'Hover' event handling.
- Move FrameScroller to VncViewModel
Previously, onGenericMotionEvent only passed events to handleMouseEvent.
Stylus hover events, however, also trigger onGenericMotionEvent, so it
needs to handle stylus events, too.
New implementation has couple of benefits:
- Handles character key press while accent key is still down
- Better handling of intermixed character/accent key events
It provides a workaround for some devices where Escape key is hardwired
to produce Back key press. But we don't want to affect the Back button
in navigation Bar which is used used for disconnecting.
Github Issue: #12
This version works correctly with TightVNC server (Windows + Linux).
According to Vino's source code, it should also work with Vino, but actually doesn't.