summaryrefslogtreecommitdiffstats
path: root/platform/android/android_input_handler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Input logic cleanup:Fredia Huya-Kouadio2024-05-191-0/+4
| | | | | | | | | | - Fix invalid detection of mouse input. Prioritize using the event tool type to detect the type of the event, and only use the event source as fallback. - Ensure that pressure and tilt information is passed for touch drag events - Consolidate logic and remove redundant methods - Improve the logic to detect when external hardware keyboards are connected to the device
* Add screen-related attributes to mouse input eventsMarkus Sauermann2024-02-051-0/+4
|
* Add InputEventKey.location to tell left from rightMel Collins2024-01-261-0/+1
| | | | | | | | | | This adds a new enum `KeyLocation` and associated property `InputEventKey.location`, which indicates the left/right location of key events which may come from one of two physical keys, eg. Shift, Ctrl. It also adds simulation of missing Shift KEYUP events for Windows. When multiple Shifts are held down at the same time, Windows natively only sends a KEYUP for the last one to be released.
* Android stylus pressure and tilt supportpikethom2023-08-151-1/+3
|
* Merge pull request #78538 from Sauermann/fix-code-simplificationsYuri Sizov2023-07-121-1/+1
|\ | | | | | | Remove unnecessary value assignments throughout the codebase
| * Code simplificationsMarkus Sauermann2023-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CPPcheck found most of them. no need to assign the variable twice: - AnimationTrackEditTypeAudio - SSEffects variable is assigned in all if-else clauses: - EditorHelp - AndroidInputHandler - MenuBar - ShaderCompiler same if clause: - ItemList clearing an empty bitfield has no effect: - Viewport
* | [Android] Set `echo` property for the physical keyboard events.bruvzg2023-07-061-1/+2
|/
* Augment the `InputEvent` class with a `CANCELED` stateFredia Huya-Kouadio2023-05-151-12/+10
| | | | | | The `InputEvent` class currently supports the `pressed` and `released` states, which given the binary nature, is represented by a `bool` field. This commit introduced the `CANCELED` state, which signals that an ongoing input event has been canceled. To represent all the states, the `InputEventState` enum is added and the `InputEvent` logic is refactored accordingly.
* [InputEventKey] Avoid setting both key and modifier to the same value.bruvzg2023-02-141-13/+21
|
* Fix the issue causing long-press on a selected node on the scene tree to ↵Fredia Huya-Kouadio2023-02-121-4/+24
| | | | trigger both the context menu and the rename functionality
* [Android] Fix virtual keyboard special keys.bruvzg2023-01-261-1/+14
|
* Cleanup and unify keyboard input.bruvzg2023-01-231-6/+4
| | | | | | | | | | - Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes. - Unify IME behaviour, add inline composition string display on Windows and X11. - Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events. - Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS. - Add support for media key handling on macOS. Co-authored-by: Raul Santos <raulsntos@gmail.com>
* Use BitField<> in core type masksJuan Linietsky2023-01-081-20/+20
| | | | | | | | * All core types masks are now correctly marked as bitfields. * The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks. * Most bitmask operations replaced by functions in BitField<> * Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is. * Documentation and API dump updated to reflect bitfields in core types.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Add double_tap attribute to InputEventScreenTouchFredia Huya-Kouadio2022-10-221-4/+5
| | | | This provides parity with the `InputEventMouseButton` allowing for proper conversion between the two events.
* Cleanup the Android input logic implementationFredia Huya-Kouadio2022-09-071-94/+123
|
* Fix incorrect Android scancodesMarcel Admiraal2022-07-131-27/+26
|
* Remove broken scroll gesture on AndroidMarcel Admiraal2022-06-211-10/+0
|
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-161-2/+3
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* Fix Actions mapped to triggers not using the full rangeMarcel Admiraal2022-01-141-4/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Rename `remove()` to `remove_at()` when removing by indexLightning_A2021-11-231-1/+1
|
* Use "enum class" for input enumsAaron Franke2021-11-121-37/+37
|
* [android] Fixed wrong button mask for right clickModProg2021-08-161-1/+1
|
* Switch to input buffering on AndroidPedro J. Estébanez2021-08-131-0/+395
Key, touch and joystick events will be passed directly from the UI thread to Godot, so they can benefit from agile input flushing. As another consequence of this new way of passing events, less Java object are created at runtime (`Runnable`), which is good since the garbage collector needs to run less. `AndroidInputHandler` is introduced to have a smaller cross-thread surface. `main_loop_request_go_back()` is removed in favor just inline calling `send_window_event()` at the most caller's convenience (i.e., leveraging the new `p_deferred`` parameter as appropriate). Lastly, `get_mouse_position()` and `get_mouse_button_state()` now just call through `Input` to avoid the need of sync of mouse data tracked on the UI thread.