Interaction Methods
  • 07 Feb 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

Interaction Methods

  • Dark
    Light

Article summary

The Blade 2's interaction methods differ significantly from traditional touchscreen Android devices. It is particularly important to keep these considerations in mind when designing the User Interface of an application intended to run on this device. Existing applications which heavily leverage touchscreen interactions do not translate well to the Blade 2. This is due to the fact that the transitional touchscreen UI is leveraging taps for input based on specific screen coordinates, which is not possible with the Blade 2’s interaction methods.


Touchpad

The Blade 2 features a two-axis touchpad with single or double-finger tracking gestures for predefined actions. The horizontal swipe gestures can be leveraged for left/right navigation and the vertical swipes can be leveraged for the up/down navigation.

The touchpad is implemented as a trackball device, and methods such as dispatchTrackballEvent() and onTrackballEvent() can be used to capture and process the raw touchpad events.

As a fallback, if you do not handle the trackball events in your application, the touchpad will fire KEYCODE_DPAD events which can be captured with standard Android methods.

Refer Android KeyEvent documentation for details on KEYCODE_DPAD events. https://developer.android.com/reference/android/view/KeyEvent.html.

Note that the Home gesture cannot be intercepted or modified. This is an expected Android behavior.


Available Gestures and Taps:

  • One-Finger Tap = Select when Blade is awake. When Blade is sleeping it turns on the display.

  • One-Finger Swipe Forward = Forward

  • One-Finger Swipe Backward = Back

  • One-Finger Swipe Up = Up

  • One-Finger Swipe Down = Down

  • One-Finger Hold for one second = Activate the app menu(if available), on Keyboard it shows the char's menu

  • Two-Finger Tap = Back or Return.

  • Two-Finger Hold for one second = Home

  • Two-Finger Swipe Back = Backspace, on keyboard deletes the previous character

  • Two-Finger Swipe Forward = Delete action depends on the app (if available); on Keyboard it is a space input.

  • Two-Finger Slide Up = Volume up

  • Two-Finger Slide Down = Volume down

  • Two-Finger Slide Down and hold= Mute

  • Three-Finger Tap = Screen OFF


KeyCodes for available taps and gestures:

  • ONE FINGER TAP: Select

    • Key Event Fired: KEYCODE_ENTER

  • ONE FINGER HOLD FOR 1 SECOND: Menu

    • Key Event Fired: KEYCODE_MENU

  • TWO FINGER TAP: Back or Return

    • Key Event Fired: KEYCODE_BACK

  • TWO FINGER SWIPE FORWARD: Delete

    • Key Event Fired: KEYCODE_FORWARD_DEL

  • TWO FINGER SWIPE BACKWARD: Backspace

    • Key Event Fired: KEYCODE_DEL

  • TWO FINGER UP: Volume up

    • Key Event Fired: KEYCODE_VOLUMEUP

  • TWO FINGER DOWN: Volume down

    • Key Event Fired: KEYCODE_VOLUMEDOWN

  • TWO FINGER DOWN and hold: Mute

    • Key Event Fired: KEYCODE_VOLUME_MUTE

  • THREE FINGER TAP: Screen OFF

    • Key Event Fired: KEYCODE_SLEEP


Touchpad Mouse

Enable this by selecting "Mouse" mode in Settings > Device > Touchpad.

Usage:

  • Swipe with one finger to move the cursor.

  • Tap with one finger to click the screen at the cursor.

  • Swipe with two fingers to scroll the view.

  • Tap with two fingers to go back.


Was this article helpful?