keymanapp / keymanapp/keyman

bug(web/android/ios): TAB key in touch layouts

Open
#4,499 3 comments 0 reactions 0 assignees View on GitHub
android/ bug ios/ web/
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

**Describe the bug**
From https://community.software.sil.org/t/tab-key-on-touch-layout/4291:

> I have been trying to add a TAB key to the touch layout. It is used in the US English keyboard on iOS and I’d like to keep close to that for familiarity, and having a TAB key can be useful.
>
> I add the key as a “Special” key, with the code “K_TAB” and the text Tab. It looks great. However, it does nothing. When pressed, no tab appears. I’ve tried changing “K_TAB” to “U_0009”, but this is rejected as an illegal key code by the compiler.
>
> Is there some way to get a functional TAB key in touch layouts? I’ve looked through the documentation and can’t find anything to suggest another way of doing it, or to say it is not permitted.

Later...

> Upon investigation, it’s because of K_TAB's overloading when dealing with DOM elements. Right now, the internal engine is still interpreting K_TAB as a DOM command, not as text output, despite being embedded. It’d take a bit of work to fix that; there’s currently no behavior-switch for K_TAB based on whether or not the internal engine is embedded.

**To Reproduce**
Refer to https://community.software.sil.org/t/tab-key-on-touch-layout/4291.

Alternatively, during work on the related https://github.com/keymanapp/keyman/pull/4350, I put together this keyboard for use in testing: [touch_tabbing.kmp.zip](https://github.com/keymanapp/keyman/files/5878032/touch_tabbing.kmp.zip).

**Expected behavior**
Clicking/touching the TAB key should result in whatever response/output is appropriate for the situation.

This isn't easy to explicitly define, as default handling of a TAB should sometimes produce a `'\t'` while at other times changing the current target for text interaction.

**Other notes**
Refer to https://github.com/keymanapp/keyman/pull/4350 for a lot of discussion on some of the complexities involved.

A solution is largely held back due to the noted complications with https://github.com/keymanapp/keyman/issues/4498.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.