I'm implementing a virtual Android keyboard and are about to add haptic feedback. Luckily Android provides
HapticFeedbackConstants so it's easy to give the user a haptic feedback.
It's however not clear to me what the difference between
VIRTUAL_KEY is, they both seem to represent pressing a virtual key. This is also the case for their counterparts
VIRTUAL_KEY_RELEASE which both seems to represent the user release a virtual key.
I found the commit where the newest ones were added (in API 27) but that unfortunally didn't clarify anything. The documentation states the following:
KEYBOARD_PRESS(Constant Value: 3 (0x00000003))
The user has pressed a virtual or software keyboard key.
VIRTUAL_KEY(Constant Value: 1 (0x00000001))
The user has pressed on a virtual on-screen key.
KEYBOARD_TAP(Constant Value: 3 (0x00000003))
The user has pressed a soft keyboard key.
User contributions licensed under CC BY-SA 3.0