-
Notifications
You must be signed in to change notification settings - Fork 0
/
algorithm
38 lines (35 loc) · 1.15 KB
/
algorithm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
IDEAL:
busca a combinação na conf dentro dentro do modo
se for um modificador:
carregue nova conf
busque o restante do combo na nova conf dentro do modo
se for um modificaro ...
se for um comando:
verifique o tipo:
caso seja realease
guarde no historico e aguarde chegar o zero
quando chegar zero, oegue o merge e envia_tecla
senão:
para cada um das teclas individualmente
caso seja onpress sem filtro
envia_tecla
caso seja onpress com filtro
verifique se a tecla anterior é a mesma que agora,
caso seja, nao faça nada e acumule
caso não seja, imprima e acumule
sempre que o acumulado for maior que 10, envia_tecla.
HOJE:
busca a combinação na conf dentro do modo
se for um modificador:
substitua o repositório de conf
para cada bit:
se combo nao for zero
decomponha o combo
para cada combo decomposto:
busque na conf pelo combo decomposto e pelo tipo de valor 1 (onpress) e modo
imprima.
guarde combo no historico
se combo for zero:
megeie o historico
busque na conf pelo combo decomposto e pelo tipo de valor 0 (release) e modo
limpe o historico