swap: Add support for swapping toggled layers (#410)
Sometimes it is desirable to transition directly from one toggled layer to another. This commit extends swap() to work not just with keys bound to layer(), but also toggle() and oneshot(). For swaps which occur one layer deep (the anticipated use case), this is rougly equivalent of a clear() followed by toggle(<target>).master
parent
685bbec982
commit
5166081c69
7 changed files with 79 additions and 22 deletions
Binary file not shown.
Binary file not shown.
@ -0,0 +1,10 @@ |
||||
1 down |
||||
2 down |
||||
300ms |
||||
1 up |
||||
2 up |
||||
a down |
||||
a up |
||||
|
||||
b down |
||||
b up |
||||
@ -0,0 +1,15 @@ |
||||
4 down |
||||
4 up |
||||
s down |
||||
s up |
||||
s down |
||||
s up |
||||
x down |
||||
x up |
||||
s down |
||||
s up |
||||
|
||||
a down |
||||
a up |
||||
shift down |
||||
shift up |
||||
Loading…
Reference in new issue