Skip to content

docs: new rota help page#2201

Merged
mcdurdin merged 11 commits intomasterfrom
docs/help-site/new-rota-help-page
Sep 8, 2025
Merged

docs: new rota help page#2201
mcdurdin merged 11 commits intomasterfrom
docs/help-site/new-rota-help-page

Conversation

@Meng-Heng
Copy link
Collaborator

@Meng-Heng Meng-Heng commented Aug 13, 2025

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Aug 13, 2025

User Test Results

Test specification and instructions

User tests are not required

@github-actions github-actions bot added the docs label Aug 13, 2025
@github-project-automation github-project-automation bot moved this to Todo in Keyman Aug 13, 2025
@Meng-Heng Meng-Heng moved this from Todo to Code Review in Keyman Aug 13, 2025
title: Rotational key rules
---

Rotational keys or rota (aka. doublepressing) is a single key pressed to output sequences of characters or letters.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think rotas are subtly different from double-press (multi-press gesture)

@jahorton - isn't there a gesture timeout involved for multi-press actions?

Whereas rotas are separate keyboard rules to handle the rotation of pressing the same key

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rotas are often a separate key, as well, for example, press a for a basic 'a', then press / repeatedly to rotate through various forms of the 'a'.

Copy link
Collaborator Author

@Meng-Heng Meng-Heng Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going for the names that our users asked; for searchability and doublepressing was one of them. I'm going to come up with something for you both to correct again. 😄

Comment on lines 20 to 34
begin Unicode > use(main)
group(main) using keys

+ [K_Z] > 'ʋ'

store(lat_norm_replacement) "zxc;ZXC:"
store(lat_vowels) "ʋɛɔɩƲƐƆɭ"

any(lat_norm_replacement) + '`' > index(lat_vowels, 1) U+0300 c ʋ̀
any(lat_norm_replacement) + "'" > index(lat_vowels, 1) U+0301 c ʋ́
any(lat_norm_replacement) + '~' > index(lat_vowels, 1) U+0303 c ʋ̃

'ʋ̀' + 'z' > 'z'
'ʋ́' + 'z' > 'z'
'ʋ̃' + 'z' > 'z'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example doesn't really work. Can you explain what you were trying to do, and we can put together a concise example?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to do a rotation from 'z' -> 'ʋ̀' -> 'z'.

store(lat_norm_replacement) "zxc;ZXC:"
store(lat_vowels) "ʋɛɔɩƲƐƆɭ"

any(lat_norm_replacement) + '`' > index(lat_vowels, 1) U+0300   c ʋ̀
any(lat_norm_replacement) + "'" > index(lat_vowels, 1) U+0301   c ʋ́ 
any(lat_norm_replacement) + '~' > index(lat_vowels, 1) U+0303   c ʋ̃

'ʋ̀' + 'z' > 'z'
'ʋ́' + 'z' > 'z'
'ʋ̃' + 'z' > 'z'

I removed the line that caused the issue. Do you think it's still relevant to the document?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these lines should be replaced with:

store(diacritic_key) "`'~"
store(diacritic) U+0300 U+0301 U+0302

store(lat_norm_replacement) "zxc;ZXC:"
store(lat_vowel) "ʋɛɔɩƲƐƆɭ"

any(lat_norm_replacement) + any(diacritic_key) > index(lat_vowel, 1) index(diacritic, 2)

match > use(rotate_repeat)

group(rotate_repeat)
any(lat_vowel) any(diacritic) index(lat_vowel, 1) index(diacritic, 2) > index(lat_norm_replacement, 1)

Then you need to explain what this is doing!


any(lat_norm_replacement) + any(diacritic_key)> index(lat_vowel, 1) index(diacritic, 2) dk(one) c z + ' > ʋ́

any(diacritic_key) dk(one) > index(lat_norm_replacement, 1) c ʋ́ + ' > z
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcdurdin, this rule does not work. Can you help change it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not quite sure what you are trying to do with this rule?

Copy link
Collaborator Author

@Meng-Heng Meng-Heng Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm trying to get:

  • z + ` = ʋ́
  • ʋ́ + ` = z
image

Copy link
Collaborator Author

@Meng-Heng Meng-Heng Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it could be any marks from the three (`,',~)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this is quite a complicated rota, because it is going between single characters and multiple characters. Can we use a simpler example here so we don't lose people?

store(vowel)  'aeiou'
store(acute)  'áéíóú'
store(grave)  'àèìòù'
store(circum) 'âêîôû'

any(vowel) + "'" > index(acute, 1)
any(acute) + "'" > index(vowel, 1)

any(vowel) + "`" > index(grave, 1)
any(grave) + "`" > index(vowel, 1)

any(vowel)  + "^" > index(circum, 1)
any(circum) + "^" > index(vowel, 1)

c -----------

any(vowel) + '/' > index(acute, 1)
any(acute) + '/' > index(grave, 1)
any(grave) + '/' > index(circum, 1)
any(circum) + '/' > index(vowel, 1)

This will allow the user to type a, ' for example, and rotate through plain-a or a with acute.

Or with /, rotate through all the different diacritic markers before going back to plain 'a'.

Does this achieve what you want to communicate to the keyboard authors? We can do more complex rotas or more complex patterns, but this has the virtue of being easy to read and understand.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! This work too.
I was going with what I used for the wali keyboard but did not quite understand the depth/complexity of it. I'll try viewing something like this in a different point of view next time.
I don't want to lose people/users too. 😆

Thank you for simplifying this, @mcdurdin.

@darcywong00 darcywong00 modified the milestones: A19S10, A19S11 Aug 29, 2025
@Meng-Heng
Copy link
Collaborator Author

This PR is ready for review.

* [store()](../reference/store)
* [any()](../reference/any)
* [index()](../reference/index)
* [Xinaliq Keyboard Help](/keyboard/xinaliq/1.1.4/xinaliq#toc-how-to-use-this-keyboard)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the referenced keyboard does use rotas, though it does feel a little odd to link to a specific keyboard from a guide page. Just wanting to prompt discussion about if the Xinaliq page link is something we want here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine either keeping or removing the link. Keyboard authors might find it helpful to see rota examples in other keyboards (maybe a small list of rota keyboards)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we keep the link, make it clear that these are example keyboards using rotas. And better to link to the source of the keyboard than the documentation.

@LornaSIL
Copy link
Contributor

LornaSIL commented Sep 3, 2025

I agree. I think the link to xinaliq could be removed.

@Meng-Heng
Copy link
Collaborator Author

Thank you, everyone!

title: Rotational key rules
---

Rotational keys, or "rotas" are combinations of one or more keys pressed together to produce a character or letter output, following the sequences defined by Keyman rules, and they will always end up back to the first letter as part of a rotation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Rotational keys, or "rotas" are combinations of one or more keys pressed together to produce a character or letter output, following the sequences defined by Keyman rules, and they will always end up back to the first letter as part of a rotation.
Rotational keys, or "rotas" are combinations of one or more keys pressed in sequence to produce a character or letter output, following the sequences defined by Keyman rules, and they will always end up back to the first letter as part of a rotation.

@mcdurdin mcdurdin merged commit dd09671 into master Sep 8, 2025
5 checks passed
@mcdurdin mcdurdin deleted the docs/help-site/new-rota-help-page branch September 8, 2025 04:00
@github-project-automation github-project-automation bot moved this from Code Review to Done in Keyman Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

docs: unable to find an example of rota keys

5 participants