Open dvergeylen opened 5 years ago
Tabs order isn't guaranteed actually: they are created by hand and then parsed in a for loop, but that doesn't guarantee they will be handled in the order they were inserted. See https://stackoverflow.com/q/280713
I did a quick test and indeed, Firefox and Chrome doesn't display the same osk tab order: 123, abc, ABC for the former, abc, 123, ABC for the latter. 😕 Having a syntax in the symbols.json file that would ensure a correct order would sanitize the user experience (IMHO).
Yes I agree with this too. This makes a lot of sense, and would also help to solve the problem encountered in #91, as you could avoid overwriting symbols if an earlier symbol also matches the current text. Javascript objects dont need to keep order in tact, although as you rightly point out, on most browsers they currently do :P
Hi Daniel,
Playing a bit with the
symbols.json
file, I was wondering why it was simply a hash of symbols, as this doesn't allow to specify an order of symbols (neither of tabs).This might be a bit confusing at first but why couldn't we define the symbols.json file as array of groups, containing an array of symbols? Something like this:
Parsing arrays sequentially,
group_headers
as they could be derived from a.reduce
on the json filesymbols.json
files. As a french speaker my keyboard is Azerty and not Qwerty for instance and since these tabs are hardcoded I can't simply tune thesymbols.json
file to localize the keyboard.I can deliver a PR for this, as I will implement this in my fork for personal purpose anyway :wink: