Skip to content

Commit

Permalink
2-keys for the example
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossless committed May 26, 2024
1 parent 4003cd6 commit 10ad850
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/keyboards/example/kbdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "sh68f90a.h"

#define MATRIX_ROWS 1
#define MATRIX_COLS 1
#define MATRIX_COLS 2

// Row Pins Bits
#define KB_R0_P7_1 _P7_1
Expand All @@ -14,8 +14,10 @@

// Column Pins Bits
#define KB_C0_P5_0 _P5_0
#define KB_C1_P5_1 _P5_1

// Column Pins
#define KB_C0 P5_0
#define KB_C1 P5_1

#endif
13 changes: 6 additions & 7 deletions src/keyboards/example/layouts/default/layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,24 @@
// clang-format off

#define LAYOUT_60( \
K00_0 \
K00_0, K01_0 \
) { \
{ K00_0 } \
{ K00_0, K01_0 } \
}

// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BL 0
#define _FL 1

const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,---.
* |Esc|
* `---'
* ,-------.
* |Esc|Ent|
* `-------'
*/
[_BL] = LAYOUT_60(
KC_ESC
KC_ESC, KC_ENT
)
};

0 comments on commit 10ad850

Please sign in to comment.