CharaChorder / CCOS-firmware

CharaChorder Operating System
17 stars 1 forks source link

Enhancement: compound chording #9

Closed jdestgermain closed 4 months ago

jdestgermain commented 1 year ago

Compound chording is a feature that let's users chain chords together to form new chords. Examples:

If you had the following chords:

input output
m+i+l+e "mile"
m+i+l "mill"
s+t+o+n+e "stone"
s+t+o+n "stone"

you could also have the following compound chords:

input1 \ input2 \ (etc up to input10) output
m+i+l+e | s+t+o+n+e milestone
m+i+l | s+t+o+n+e millstone
m+i+l+e | s+t+o+n milestone
m+i+l | s+t+o+n chicken bockbock
jdestgermain commented 1 year ago

Impulse menu Proposal

For impulse menu, we propose using Shift+Enter while in the impulse menu on the "chord input" screen to advance to add the second chord and so forth...so

>I<mpulse output: milestone             // Press enter to confirm at this step
>I<mpulse input(1): m + l + i + e       // Press enter to confirm a normal chord or a Shift+Enter to get to the next compound chord
>I<mpulse input(2): t + s + o + n      // Press enter for to confirm the compound chord or a Shift+Enter and so on
jdestgermain commented 1 year ago

Serial API proposal

The below is left for historical purposes, but we don't think we need this actually

Add 3 new CML sub commands:

Subcommand Code Description
C5 GET_CHORDMAP_BY_COMPOUNDCHORD Gets a chordmap by the compound chord (hexadecimal) values if it is found in the library.
C6 SET_CHORDMAP_BY_COMPOUNDCHORD Sets a chordmap with a compound chord and output bytes (hexadecimal).
C7 DEL_CHORDMAP_BY_COMPOUNDCHORD Deletes a chordmap from the library if the compound chord exists.

Success:

> CML <C5,C6,C7> <chord input> <chord 2 input> ... <chord n input><chord output>
CML  <C5,C6,C7> <chord input> <chord 2 input> ... <chord n input><chord output> 0 // if success

Failure:

> CML <C5,C6,C7> <chord input> <chord 2 input> ... <chord n input><chord output>
CML  <C5,C6,C7> <chord input> <chord 2 input> ... <chord n input><chord output> 1 // if failure
jdestgermain commented 9 months ago

Known issues with compound chords, as of 1.9.9

Tentatively done:

jdestgermain commented 4 months ago

This is now implemented/fixed in the latest version of CCOS, 2.0.0-beta, and will be fully released whenever that moves into production.