Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callum style layout improvements and my layout changes #16174

Merged
merged 81 commits into from
Oct 25, 2022
Merged
Changes from 1 commit
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
9b0a753
Slightly different layout.
daliusd Oct 22, 2021
c502c71
Shift added to mouse layer.
daliusd Oct 22, 2021
8b49b67
Position for some keys swapped.
daliusd Oct 27, 2021
b7492f3
Numbers location changed.
daliusd Nov 5, 2021
b8542ba
Combos for the most common actions added.
daliusd Dec 11, 2021
a64349c
Shorter combo term.
daliusd Dec 12, 2021
4794b93
Combos to avoid accidental wrong sequence.
daliusd Dec 13, 2021
c93e429
Clean-up
daliusd Dec 17, 2021
fec1fbd
Trigger one shots from combo.
daliusd Dec 22, 2021
f5a7f6f
Flow initial version.
daliusd Dec 23, 2021
d07ede6
gitignore
daliusd Dec 23, 2021
0069672
More tests added.
daliusd Dec 23, 2021
e8301a3
One more case handled.
daliusd Dec 23, 2021
53fc9f6
One more test case added.
daliusd Dec 23, 2021
a8e98a7
Canceling using layer key implemented.
daliusd Dec 23, 2021
cd18d76
TODO note added.
daliusd Dec 23, 2021
8c6728c
Allow canceling with any layer key.
daliusd Dec 25, 2021
f679854
One more test case added to cover corner case.
daliusd Dec 25, 2021
24385f6
Handling case when second key is pressed slightly faster than layer key.
daliusd Dec 25, 2021
82aff3e
Added timeout for one shot mods.
daliusd Dec 25, 2021
c0468ab
Timers can be defined.
daliusd Dec 27, 2021
aeaf9b8
One shot layers code moved to flow.
daliusd Dec 27, 2021
f9c157d
Set default FLOW_TERM as 10.
daliusd Dec 27, 2021
c71f416
Personal config change.
daliusd Dec 27, 2021
87eb17a
Some layer tests added.
daliusd Dec 27, 2021
2bc1fec
readme updated.
daliusd Dec 30, 2021
6fa4d6e
Minor fix.
daliusd Dec 30, 2021
be04664
Config and code simplified.
daliusd Jan 3, 2022
11a2b6a
Timeout for layers added.
daliusd Jan 3, 2022
2e333a6
Minor fix.
daliusd Jan 4, 2022
0c4a592
Shift bug fixed.
daliusd Jan 4, 2022
0b148f3
Layers reorganization.
daliusd Jan 7, 2022
a18fc12
Documentation update.
daliusd Jan 7, 2022
9bebda2
Some tests for layers added.
daliusd Jan 11, 2022
c1dda04
Test added for non working case.
daliusd Jan 11, 2022
6707d16
One more case handled.
daliusd Jan 11, 2022
e55b685
Some fun with double nav key.
daliusd Jan 11, 2022
e23a6fe
Config changed.
daliusd Jan 12, 2022
5076ecf
Playing around with one shot layers.
daliusd Jan 12, 2022
4f541cb
Some combos added.
daliusd Jan 17, 2022
9d41489
Combos for Lithuanian letters.
daliusd Jan 17, 2022
6edd41f
Different layout attempt.
daliusd Jan 18, 2022
8b38f60
Extra RESET removed.
daliusd Jan 18, 2022
48660d7
commaspace for rašymui lietuviškai
daliusd Jan 19, 2022
e15fdc2
Minor fix.
daliusd Jan 21, 2022
40f469e
Swapper key added.
daliusd Jan 21, 2022
08b2782
Ignore shift in swapper.
daliusd Jan 21, 2022
56ccb8d
Swapper improved.
daliusd Jan 21, 2022
dcc8693
Let's use stronger fingers.
daliusd Jan 24, 2022
3f94a93
Video shortcut created.
daliusd Jan 24, 2022
5885db1
Restored some stuff as it is more consistent with rest of stuff.
daliusd Jan 25, 2022
8b0c2fc
Minor change.
daliusd Jan 25, 2022
786309d
Clean-up
daliusd Jan 25, 2022
3682008
LT layer added on trilayer.
daliusd Jan 31, 2022
a9cdd74
Documentation update and clean-up.
daliusd Feb 2, 2022
90c6917
Func layer moved.
daliusd Feb 4, 2022
69a3015
Clean-up
daliusd Mar 22, 2022
89d4979
Licenses added.
daliusd Mar 23, 2022
3377672
KC_DEL added.
daliusd Apr 14, 2022
a15763d
Experimenting
daliusd Jul 19, 2022
d8c30c7
Reverting experiment as some functionality is not compatible with Linux.
daliusd Aug 25, 2022
b978573
(GUI|CTRL)+(X|C|V) more accessible.
daliusd Aug 25, 2022
314a824
(CMD|CTRL)+ENTER is used after all.
daliusd Aug 25, 2022
45c6074
Switching backspace and tilde.
daliusd Aug 25, 2022
936006a
Reset removed as we have timeout based reset that does the work.
daliusd Aug 26, 2022
2ade77b
Do not override escape and backspace for right side GUI and CTRL.
daliusd Aug 26, 2022
63c2d6d
One shots not initiated if held for longer than 500ms
daliusd Aug 28, 2022
3cde38b
Bug with times fixed.
daliusd Aug 30, 2022
8877ff7
Timer bug fixed with layers.
daliusd Aug 30, 2022
dc2f3b0
Simplification after bug fix.
daliusd Sep 1, 2022
87c298c
Readme update.
daliusd Sep 5, 2022
38fa597
Minor changes.
daliusd Sep 12, 2022
086e3ce
Minor improvement.
daliusd Sep 13, 2022
83510dc
Some minor additions.
daliusd Sep 16, 2022
137af06
Right alt
daliusd Sep 19, 2022
9fc1376
Use different layout for Lithuanian symbols on Linux and Mac.
daliusd Oct 2, 2022
2d42dc1
Add Lithuanian uppercase row.
daliusd Oct 3, 2022
426febf
Documentation update.
daliusd Oct 3, 2022
5b50db3
Tests removed.
daliusd Oct 3, 2022
ec6528e
Merge branch 'master' into flow
daliusd Oct 3, 2022
32136bb
Clean-up
daliusd Oct 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
readme updated.
daliusd committed Dec 30, 2021
commit 2bc1fecdcddf5f1e63f668ed4fadcd6061fdcc2c
5 changes: 4 additions & 1 deletion keyboards/a_dux/keymaps/daliusd/keymap.c
Original file line number Diff line number Diff line change
@@ -57,7 +57,10 @@ enum custom_keycodes {
// flow_config should correspond to following format:
// * layer keycode
// * non-layer keycode
// * control keycode
// * modifier keycode that must be triggered when layer and
// non-layer are pressed
// Note that non-layer keycode must be used both in main layer and layer that
// is turned on by layer keycode
const uint16_t flow_config[FLOW_COUNT][3] = {
{L_NAV, KC_A, KC_LALT},
{L_NAV, KC_S, KC_LGUI},
114 changes: 109 additions & 5 deletions keyboards/a_dux/keymaps/daliusd/readme.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,125 @@
# My 34 keys layout

This are my principles for layout:
This is my principles for layout:

* I am using Callum style layout. Here you can read explanation by
Callum himself and his reasoning for not using mod-tap:
[here](../../../../users/callum/readme.md)

* There should be only one way to type key. Key can be on
different layer but it must maintain its physical location.
different layer but it must maintain its physical location. I
broke this rule for Shift key only.

* The less features are used the better.

* trilayer is cool.

* There is 🐍 key for no reason.

As well I have added one shot layers compatible with Callum's one
shot keys.
* There is simple TMUX layer.

There is simple TMUX layer as well.
## Improvements over Callum

* I have added one shot layers compatible with Callum's one shot
keys.

* There is one issue with accidental uppercase characters fixed
that exists in original Callum layout.

* Sometimes when I press `NAV (layer key) + S + Tab` to get
`Command + Tab` I ended up with `S + Nav + Tab`. This happened
because I did that really fast and sometimes clicked S slightly
earlier than NAV layer key. Initially I have solved this problem
using Combo keys, but that's additional dependency and combo
keys are not ideal for Callum layer. You need to release both
keys to trigger Combo key release. Therefore I have written
custom code that allows pressing S some milliseconds earlier.
This is controlled by FLOW_TERM and defaults to 10. I do not
recommend setting this to higher than 30.

* Another annoying feature of Callum layer is one shot keys frozen
until you cancel them. This is problem when you use one hand for
keyboard and another for mouse. E.g. you click Ctrl and mouse to
get some menu, and then you want to click some item in that
menu. You have to remember to cancel one shot in such
situation. I have added default 500ms period (can be changed
using FLOW_ONESHOT_TERM) where you have to press next key.
Otherwise oneshot is canceled.

Since differences are quite significant I named this `flow`.

NOTE: this is still work in progress and might change in the
future.

## Using flow with your keyboard

Copy `flow.c` and `flow.h` to keyboard folder.

Add following line to `rules.mk`:

```make
SRC += flow.c
```

Define following in `config.h`:

```c
#define FLOW_COUNT 7
#define FLOW_LAYERS_COUNT 3
```
In your `keymap.c` add and configure like this:
```c
#include "flow.h"
...
// flow_config should correspond to following format:
// * layer keycode
// * non-layer keycode
// * modifier keycode that must be triggered when layer and
// non-layer are pressed
// Note that non-layer keycode must be used both in main layer and layer that
// is turned on by layer keycode
const uint16_t flow_config[FLOW_COUNT][3] = {
{L_NAV, KC_A, KC_LALT},
{L_NAV, KC_S, KC_LGUI},
{L_NAV, KC_D, KC_LCTL},
{L_NAV, KC_E, KC_LSFT},
{L_SYM, KC_K, KC_LCTL},
{L_SYM, KC_L, KC_LGUI},
{L_SYM, KC_SCLN, KC_LALT},
};
const uint16_t flow_layers_config[FLOW_LAYERS_COUNT][2] = {
{OS_TMUX, _TMUX},
{OS_MISC, _MISC},
{OS_FUNC, _FUNC},
};
...
// Add following to handle flow
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!update_flow(keycode, record->event.pressed, record->event.key)) return false;
return true;
}
void matrix_scan_user(void) {
flow_matrix_scan();
}
```

## Development

Note that `flow` is covered with tests. You can run tests in two
ways:

* Run `./tests/test.sh` directly

* Install `fswatch` to your system and run `./tests/monitor.sh` in
separate terminal, tab or tmux pane. Make changes to `flow.c` or
`./tests/test.c` and see if you have not broken any tests.