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

Create ajp10304 userspace and ortho_4x12 layout. #9304

Merged
merged 17 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
117 changes: 117 additions & 0 deletions keyboards/acheron/shark/keymaps/ajp10304/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# AJP10304 Custom Shark Layout
# Also available for the Planck, JJ40 and Atreus50

**Note:** In the tables below where there are two characters on a key,
the second is the output when shift is applied.

**Note:** The below tables assume a UK layout.

####Flashing
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
make acheron/shark:ajp10304

##### Main Qwerty Layer

* Tab: when held, operates as shift.
* Enter: when held, operates as shift.
* MENU: perform right-click

| | | | | | | | | | | | |
| ---- |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| ----:|
| Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
| Tab | A | S | D | F | G | H | J | K | L | ;: | Enter|
| Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft |
| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 |

##### Function Layer
Activated when `fn` held in the above `qwerty` layer.

| | | | | | | | | | | | |
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT|
| Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift |
| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn2 |

##### Lower Layer
Activated when `Lower` is held in the above `qwerty` layer.

* Numbers are along the top row, their shifted counterparts are on row 2.
* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word.
* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word.

| | | | | | | | | | | | |
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp |
| ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks|
| Shift | \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift |
| | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play |

##### Raise Layer
Activated when `Raise` is held in the above `qwerty` layer.

* Preferred layer for typing brackets.
* Allows for cursor navigation to be used solely with the right hand.
* WRDSEL: Select the word where the cursor is.
* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping.
fauxpark marked this conversation as resolved.
Show resolved Hide resolved

| | | | | | | | | | | | |
| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:|
| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC|
| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +|
| | | | { | } | |&#124;<| LEFT | DOWN |RIGHT |>&#124;|ZOOM -|
| Mouse | | | | | Alt | Enter |Raise | | | | |

##### Lower + Raise
Activated when `Lower` and `Raise` are held together in the above `qwerty` layer.

* Audio controls in the same position as cursor keys from the `Raise` layer.
* ????: Runs a macro for outputting a text string. Do not use this store passwords.
* Reset: Enter bootloader for flashing firmware to the keyboard.
* CAPS: Toggle caps lock.
* Macro functions: Allows recording of macros. To start recording the macro, press either REC1 or REC2.
To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2.
* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER,
MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively.

| | | | | | | | | | | | |
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
| ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del |
| CAPS | | | | | PLAY1|PLAY2 | Mute | Vol+ | Play | | |
| MAC | | | | | STOP1|STOP2 | Prev | Vol- | Next | | |
| | | | | | | | | DYN | | | |

##### Function 2 Layer
Activated when `fn` held in the above `qwerty` layer.
* WRDSEL: Select the word where the cursor is.
* LNDEL: Delete the line where the cursor is.
* LNSEL: Select the line where the cursor is.
* DUP: Duplicate the selected text.
* LNJOIN: Join the line where the cursor is with the following line.
* MODE: Print either `PC` or `OSX` depending on what layer mode is active.

| | | | | | | | | | | | |
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
| | |WRDSEL| | | | LNDEL| | | | | |
| | | LNSEL| DUP | | | | |LNJOIN| | | |
| | UNDO | CUT | COPY | PASTE| | | | | | | MODE |
| | | | | | | | | | | | |

##### Mouse Layer
Activated when `fn` and `raise` held together.

| | | | | | | | | | | | |
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
| ESC | | | | | | | | | | | |
| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | |
| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN | RIGHT| | |
| | | | | | | | | | | | |

##### Number Pad Layout
Activated when holding `Esc` key.

| | | | | | | | | | | | |
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
| | | | | | |NMLOCK| 7 | 8 | 9 | / | |
| | | | | | | | 4 | 5 | 6 | * | |
| | | | | | | | 1 | 2 | 3 | + | |
| | | | | | | | 0 | . | , | - | |
2 changes: 1 addition & 1 deletion keyboards/handwired/atreus50/atreus50.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "quantum.h"

// The first section contains all of the arguements
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
Expand Down
198 changes: 22 additions & 176 deletions keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c
Original file line number Diff line number Diff line change
@@ -1,39 +1,6 @@
#include QMK_KEYBOARD_H
#include "keymap_uk.h"

extern keymap_config_t keymap_config;

enum planck_layers {
_QWERTY,
_MAC,
_LOWER,
_MLWR,
_RAISE,
_MRSE,
_FUNC,
_MFNC,
_FUNC2,
_MFNC2,
_ADJUST,
_MOUSE
};

enum planck_keycodes {
QWERTY = SAFE_RANGE,
MAC,
FUNC,
MFNC,
FUNC2,
MFNC2,
LOWER,
MLWR,
RAISE,
MRSE,
MOUSE,
DYNAMIC_MACRO_RANGE
};

#include "dynamic_macro.h"
#include "ajp10304.h"

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

Expand All @@ -49,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-------------------------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,
LT(_NUMPAD, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,\
drashna marked this conversation as resolved.
Show resolved Hide resolved
MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) ,
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT ,
MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2)
Expand Down Expand Up @@ -145,6 +112,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),


/* Num Pad
* ,------------------------------------------ |-----------------------------------------.
* | ESC | | | | | | |NMLOCK| 7 | 8 | 9 | / | |
* |------+------+------+------+------+------- |------+------+------+------+------+------|
* | | | | | | | | | 4 | 5 | 6 | * | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | 1 | 2 | 3 | + | |
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------|
* | | | | | | | | | | 0 | . | , | - | |
* `-------------------------------------------------------------------------------------------------'
*/
[_NUMPAD] = LAYOUT(\
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
_______, _______, _______, _______, _______, _______, KC_NLCK, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, _______,\
_______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, _______,\
_______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, _______,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_DOT, KC_COMM, KC_KP_MINUS, _______\
drashna marked this conversation as resolved.
Show resolved Hide resolved
),


/* Function 2 (Right hand side)
* ,------------------------------------------ |-----------------------------------------.
* | | |WRDSEL| | | | | LNDEL| | | | | |
Expand Down Expand Up @@ -199,144 +186,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)

};

void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}

bool process_record_user(uint16_t keycode, keyrecord_t *record) {

if (!process_record_dynamic_macro(keycode, record)) {
return false;
}

switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY);
}
return false;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
case MLWR:
if (record->event.pressed) {
layer_on(_LOWER);
layer_on(_MLWR);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
layer_off(_MLWR);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
case MRSE:
if (record->event.pressed) {
layer_on(_RAISE);
layer_on(_MRSE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
layer_off(_MRSE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
case MFNC:
if (record->event.pressed) {
layer_on(_FUNC);
layer_on(_MFNC);
} else {
layer_off(_FUNC);
layer_off(_MFNC);
}
return false;
case MFNC2:
if (record->event.pressed) {
layer_on(_FUNC2);
layer_on(_MFNC2);
} else {
layer_off(_FUNC2);
layer_off(_MFNC2);
}
return false;
}
return true;
}

const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) {
// These would trigger when you hit a key mapped as M(0)
if (record->event.pressed) {
switch(keycode) {
case 0: // Some custom string here
SEND_STRING("");
return false;

case 1: // Word Select
SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LCTRL));
return false;

case 2: // Word Select Mac
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT));
return false;

case 3: // Line Select
SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT));
return false;

case 4: // Line Select Mac
SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT));
return false;

case 5: // Line Delete
SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT));
SEND_STRING(SS_TAP(X_BSPACE));
return false;

case 6: // Line Delete Mac
SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT));
SEND_STRING(SS_TAP(X_BSPACE));
return false;

case 7: // Duplicate Selection
SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v"));
return false;

case 8: // Duplicate Selection Mac
SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v"));
return false;

case 9: // Join line
SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE));
return false;

case 10: // Join line Mac
SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE));
return false;

case 98: // Print mode
SEND_STRING("PC");
return false;

case 99: // Print mode
SEND_STRING("OSX");
return false;
}
}
return MACRO_NONE;
};
18 changes: 15 additions & 3 deletions keyboards/handwired/atreus50/keymaps/ajp10304/readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# AJP10304 Custom Atreus50 Layout
# Also available for the Planck and JJ40
# Also available for the Planck, Shark and JJ40

**Note:** In the tables below where there are two characters on a key,
the second is the output when shift is applied.

**Note:** The below tables assume a UK layout.

####Flashing
drashna marked this conversation as resolved.
Show resolved Hide resolved
teensy_loader_cli -w -mmcu=atmega32u4 handwired_atreus50_ajp10304.hex
drashna marked this conversation as resolved.
Show resolved Hide resolved

##### Main Qwerty Layer

* Tab: when held, operates as shift.
Expand Down Expand Up @@ -103,6 +106,15 @@ Activated when `fn` and `raise` held together.
| ACC0 | ACC1 | ACC2 | | | | | | | LEFT | DOWN | RIGHT| | |
| | | | | | | Ctrl | Alt | | | | | | |

##### Number Pad Layout
Activated when holding `Esc` key.

| | | | | | | | | | | | | | |
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
| | | | | | | | |NMLOCK| 7 | 8 | 9 | / | |
| | | | | | | | | | 4 | 5 | 6 | * | |
| | | | | | | | | | 1 | 2 | 3 | + | |
| | | | | | | Ctrl | Alt | | 0 | . | , | - | |



##Program Command
teensy_loader_cli -w -mmcu=atmega32u4 handwired_atreus50_ajp10304.hex
1 change: 1 addition & 0 deletions keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ OPT_DEFS = $(filter-out -DBOOTLOADER_SIZE=4096,$(TEMP))
OPT_DEFS += -DBOOTLOADER_SIZE=512
fauxpark marked this conversation as resolved.
Show resolved Hide resolved

BOOTLOADER = halfkay

Loading