Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec(web,developer): multitap and flick for touch keyboards 🐵 #5029

Closed
2 of 6 tasks
mcdurdin opened this issue May 4, 2021 · 21 comments · Fixed by #7324
Closed
2 of 6 tasks

spec(web,developer): multitap and flick for touch keyboards 🐵 #5029

mcdurdin opened this issue May 4, 2021 · 21 comments · Fixed by #7324

Comments

@mcdurdin
Copy link
Member

mcdurdin commented May 4, 2021

This is part of a broader specification for Caps Lock support on touch devices. Development of this touches multiple components; each component will be implemented in a separate PR, referencing this issue.

This feature has emerged from the caps layer feature and is now treated separately for implementation.

Related features

Introduction

A caps layer, if present, will be accessible by double-tapping the Shift key. We won't add a longpress to Shift because in future we might want to use this for multitouch approach (e.g. hold Shift, press X with another finger to give a capital X and return to default). (Also, double-tap is standard Caps-lock UX)

The double-tap will be defined by a new attribute for keys, called multiTap. This will be an array similar to the subkeys array. Although the key cap won't be initially meaningful, we will store it in case we want to use it for visual feedback in a future version (e.g. a brief popup).

  • (See also LDML multitap property.)
  • We will ignore multitap on globe button, just as we ignore longpress.

C5029.1 File Formats: .keyman-touch-layout changes

Changes to the file format and the JSON schema are required.

  1. Required: Add a multiTap property to the key object. This will be an array in the same format as the existing sk longpress property.

We will not require specific key codes for multitap. A recommended pattern would be T_2X_A, T_3X_A for a double tap and a triple tap on an 'A' key.

  1. Optional: Add flick object to the key object. This will be an object with cardinal directions n,e,s,w and intercardinal directions ne,se,sw,nw as properties of the object. Each of those properties will be a key in the same format as the keys in the sk array. (Note: LDML has a flick property so we may need to implement this in order to complete the LDML implementation.)

Backward compatibility

Touch layout files that contain these features will be backwardly compatible with earlier versions of Keyman, with a graceful degradation of functionality.

  • The multiTap property will be ignored by older versions of KeymanWeb.

C5029.2 Changes to Developer IDE

  • Required: The touch layout editor needs to surface the multiTap property as a new section similar to the longpress interface.
  • Required: The touch layout editor needs to visually flag the presence of multiTap properties in its keyboard view. (For longpress this is currently a slash on top right of the key; something similar but differentiated is needed for multitap).
  • Optional: The touch layout editor needs to surface the flick property again as a new section similar to the longpress interface.
  • Optional: The touch layout editor needs to visually flag the presence of flick properties in its keyboard view.

C5029.3 KeymanWeb enhancements

  • Required: KeymanWeb needs to support the multiTap property.

Caps Lock Interaction: double-tapping Shift will switch to the caps layer.

  • Question: What do we do when the first tap in a multitap changes the layer? How do we link the second tap to the first one?
    • Could we ‘cache’ the multitap key?
      • Implementation, loosely: if touch is within the multitap time window, and location is within the touch-bounds of the multitap source key:
      • Automatically use the source key & continue the multitap
      • Reset the time window’s start, allowing it to be further continued.

The time between the two taps should be less than 300ms to be treated as a double tap. If the time between taps is longer than that, the second tap should trigger a normal key interaction. Any other interaction after the first tap will cancel the double-tap state.

Subsequent taps in a multi-tap sequence will never trigger a longpress or a flick.

  • Required: KeymanWeb will need to use the transcriptions feature to roll back previous outputs in the multitap sequence. Layer changes will not be rolled back, just output.

  • Optional: We will need an API in web to change the default double-tap time, accessible from Android, iOS and web apps.

  • Optional: KeymanWeb needs to support the flick property and gesture.

    • If a keyboard defines flicks, then we may need to disable the model of sliding across keys to a choose a different key that we currently support, for that keyboard.
    • Flicks may be shown in the OSK as a small character on the appropriate edge or corner of the key?
    • May need an API to enable/disable flicks per user preference.

C5029.4: Android and iOS changes

Related Issues and discussions

@mcdurdin
Copy link
Member Author

mcdurdin commented Dec 1, 2021

Most of the KeymanWeb-side infrastructure for multi-tap is implemented in #5989, as a generalized solution with a specialized case for Shift -> Caps in 15.0.

Developer-side infrastructure is needed, plus a more detailed discussion of how to handle multitap and rollback (while we could use the transcriptions feature, it is not entirely clear to me that this is the most appropriate way to solve this):

  • Required: KeymanWeb will need to use the transcriptions feature to roll back previous outputs in the multitap sequence. Layer changes will not be rolled back, just output.

@MayuraVerma
Copy link
Contributor

Is it possible to enable double tap gesture for all keys in version 15?
there is no need for developer GUI, we can edit the source in textpad, as long as keyman can compile it.
developer gui can wait.
double tap will make a huge difference
I can finally release the keyboard

@mcdurdin mcdurdin added this to the A17S22 milestone Sep 15, 2023
@mcdurdin mcdurdin changed the title spec: multitap and flick for touch keyboards 🐵 spec(web,developer): multitap and flick for touch keyboards 🐵 Sep 15, 2023
@mcdurdin mcdurdin added the m:osk On Screen Keyboard or Touch Keyboard, all platforms label Sep 16, 2023
@mcdurdin mcdurdin modified the milestones: A17S22, A17S23 Oct 1, 2023
@mcdurdin mcdurdin modified the milestones: A17S23, A17S24 Oct 15, 2023
@mcdurdin mcdurdin modified the milestones: A17S24, A17S25 Oct 27, 2023
@mcdurdin mcdurdin modified the milestones: A17S25, A17S26 Nov 13, 2023
@darcywong00 darcywong00 modified the milestones: A17S26, A17S27 Nov 27, 2023
@mcdurdin mcdurdin modified the milestones: A17S27, A17S28 Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@srl295 @mcdurdin @darcywong00 @MayuraVerma @jahorton and others