Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in the discussion thread #146 (comment) here is a PR which provides extra characters to the T-Deck keyboard.
I listen for
alt+c
which the keyboard firmware provides as a formfeed character, this is used to enable an alternate character mode using a bool. On the next key press if the key pressed has an alternative character configured within theCharMappings
struct it will return the alternative character otherwise it will return the original character, then it will reset the bools state to false to mimic thesym
key behaviour.The following extra characters are currently implemented:
q
~
w
%
e
|
r
%
t
{
y
}
(
[
sym
button to be pressed afteralt+c
)
]
sym
button to be pressed afteralt+c
u
^
i
<
o
>
p
=
g
\
k
`
<space>
<tab>
In its current state this PR doesn't provide the much needed
ctrl
andalt
keys along with a few other notable omissions like£
. These should be able to be implemented with a little extra work/logic as each key can now provide 2 extra characters on top of the ones printed on the keyboard.I would love to hear your thoughts on the implementation and whether it could be improved.