Skip to content

Commit

Permalink
remove apt layer and fix combos for scroll layer
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaaSaadAbdo authored Jul 29, 2024
1 parent 3f6f0a1 commit 08f9395
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 87 deletions.
82 changes: 7 additions & 75 deletions config/base30.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@
#include <dt-bindings/zmk/outputs.h>

#define HDN 0
#define APT 1
#define NAV 2
#define SYM 3
#define HDNW 4
#define APTW 5
#define NAVW 6
#define SYMW 7
#define NAV 1
#define SYM 2
#define HDNW 3
#define NAVW 4
#define SYMW 5
#ifdef GHAZAL
#define SCROLL 8
#define SNIPE 9
#define SCROLL 6
#define SNIPE 7
#endif

#define SK(KEY) &nk KEY KEY
Expand Down Expand Up @@ -134,39 +132,6 @@
#endif
};

apt {
label = "APT";
bindings = <

// qwerty for arabic

// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT
// ├──── ─────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp C &kp N &kp M &kp COMMA &kp DOT &kp SQT
// ╰─────────────┴─────────────┼─────────────┤ ├─────────────┼─────────────┴─────────────╯
&macro_nav &kp SPACE &skq LSHIFT &macro_sym
// ╰─────────────┴─────────────╯ ╰─────────────┴─────────────╯

#ifdef WASFOORA
// up left down right middle
&kp C_VOL_UP &kp C_VOL_DN &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE
#endif

#ifdef GHAZAL
SL(SCROLL)
&trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
#endif

>;
#ifdef ENCODERS
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_UP PG_DN>;
#endif
};

navigation {
label = "NAV";
bindings = <
Expand Down Expand Up @@ -251,39 +216,6 @@
#endif
};

aptw {
label = "APTW";
bindings = <

// qwerty for arabic

// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT
// ├──── ─────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp C &kp N &kp M &kp COMMA &kp DOT &kp SQT
// ╰─────────────┴─────────────┼─────────────┤ ├─────────────┼─────────────┴─────────────╯
&macro_navW &kp SPACE &skq LSHIFT &macro_symW
// ╰─────────────┴─────────────╯ ╰─────────────┴─────────────╯

#ifdef WASFOORA
// up left down right middle
&kp C_VOL_UP &kp C_VOL_DN &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE
#endif

#ifdef GHAZAL
SL(SCROLL)
&trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
#endif

>;
#ifdef ENCODERS
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_UP PG_DN>;
#endif
};

navigation_windows {
label = "NAVW";
bindings = <
Expand Down
2 changes: 1 addition & 1 deletion config/boards/shields/ghazal/ghazal.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ nice_view_spi: &spi1 {
irq-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;

/* optional features */
snipe-layers = <3 7 9>;
snipe-layers = <2 5 7>;
scroll-layers = <8>;
// automouse-layer = <4>;
};
Expand Down
29 changes: 18 additions & 11 deletions config/combos30.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,26 @@ compatible = "zmk,combos";
key-positions = <KEYPOS>; \
};

#define ALPHA_ALL HDN HDNW APT APTW
#define ALPHA_MAC HDN APT
#define ALPHA_WIN HDNW APT
#define ALPHA_ALL HDN HDNW
#define ALPHA_MAC HDN
#define ALPHA_WIN HDNW

/* Missing Alphas */
COMBO(Q, &kp Q, 21 22, ALPHA_ALL SCROLL) // Q
COMBO(Z, &kp Z, 1 2, ALPHA_ALL SCROLL) // Z
COMBO(V, &kp V, 20 21, ALPHA_ALL SCROLL) // V
COMBO(X, &kp X, 2 3, APT APTW SCROLL) // X
COMBO(DAL, &kp RBKT, 7 8, APT APTW SCROLL) // ]
COMBO(Q, &kp Q, 21 22, ALPHA_ALL
#ifdef GHAZAL
SCROLL
#endif
) // Q
COMBO(Z, &kp Z, 1 2, ALPHA_ALL
#ifdef GHAZAL
SCROLL
#endif
) // Z
COMBO(V, &kp V, 20 21, ALPHA_ALL
SCROLL#ifdef GHAZAL
SCROLL
#endif
) // V

/* Brackets */
COMBO(left_bracket, &kp LBKT, 1 11, ALPHA_ALL)
Expand Down Expand Up @@ -94,9 +104,6 @@ COMBO(bt_3, &bt BT_SEL 3, 3 4, NAV NAVW)
GCOMBO(switch_to_HDN_mac, &to HDN, 0 10 26)
GCOMBO(switch_to_HDN_win, &to HDNW, 9 19 29)

GCOMBO(switch_to_APT_mac, &to APT, 1 11 26)
GCOMBO(switch_to_APT_win, &to APTW, 8 18 29)

/* bluetooth profile + default layer */
COMBO(btblhdn, &macro_btblwin, 27 20 21, ALPHA_ALL)
COMBO(btblhdnw, &macro_btblmac, 27 21 22, ALPHA_ALL)
Expand Down

0 comments on commit 08f9395

Please sign in to comment.