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

Add printedpad keyboard #21202

Merged
merged 54 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
bf99ec7
Initial Commit - added magtray4x4
noahbei Mar 26, 2023
da1728e
add 4 layers, start layer code
noahbei Mar 26, 2023
b7581bb
add layer_move
noahbei Mar 29, 2023
201f6b2
fix keymap and layer switching
noahbei Mar 29, 2023
784560b
clean up code
noahbei Mar 31, 2023
57c2eec
add via folder
noahbei Mar 31, 2023
4311934
update format
noahbei Mar 31, 2023
de37662
initial commit - add magtray4x3
noahbei Mar 31, 2023
bf5c31b
fix matrix pin names
noahbei Apr 1, 2023
c86756c
fix spelling
noahbei Apr 4, 2023
b2ed8b1
Initial commit - add oled, change layer toggle key
noahbei Apr 5, 2023
36f9b58
update keymap.c with oled display
noahbei Apr 12, 2023
76354bb
add halconf.h and mcuconf.h to keyboard folder
noahbei Apr 14, 2023
581cb76
add rest of monkey animation, remove uneeded code
noahbei Apr 14, 2023
a9d0211
remove cursor comment
noahbei Apr 14, 2023
29bbddf
remove cursor comment
noahbei Apr 14, 2023
7ba1c0f
Merge branch '4x3-experimental' of https://github.com/noahbei/qmk_fir…
noahbei Apr 15, 2023
8c76c5a
add i2c config
noahbei Apr 24, 2023
333ac89
add i2c config
noahbei Apr 24, 2023
1a03759
shift i2c addresses
noahbei Apr 24, 2023
a886a80
added all of the i2c stuff
noahbei Apr 25, 2023
2597544
deleted some stuff
noahbei Apr 25, 2023
ff91cc8
comment out adress shifting
noahbei Apr 25, 2023
9818949
add board_init for I2C1 oled
noahbei May 7, 2023
c2aec87
add flash_current_layer and render_button_pressed
noahbei May 7, 2023
5338b7c
remove tests
noahbei May 7, 2023
c016f24
fix oled screen lag
noahbei May 7, 2023
1655a19
add ben keymap
noahbei May 11, 2023
7965897
refactor - move oled code from keymap to keyboard
noahbei May 13, 2023
eb15c49
refactor - remove oled code
noahbei May 13, 2023
528e158
change layer keycodes
noahbei May 13, 2023
e6e4ff8
rename to printedpad
noahbei May 25, 2023
449166d
add licensing
noahbei May 25, 2023
1c7759a
add licensing
noahbei May 25, 2023
dbc9b30
Merge branch '4x3-experimental' of https://github.com/noahbei/qmk_fir…
noahbei May 25, 2023
759f93b
include quantum
noahbei May 25, 2023
5a54afd
switch order of oled modes
noahbei Jun 10, 2023
ba80997
add image and availability links
noahbei Jun 10, 2023
28dc864
increase oled timout val
noahbei Jun 10, 2023
6b2b76c
Merge branch 'qmk:master' into 4x3-experimental
noahbei Jun 10, 2023
63ba9f8
update keymaps to have numpad keys
noahbei Jun 10, 2023
967a8d9
Merge branch '4x3-experimental' of https://github.com/noahbei/qmk_fir…
noahbei Jun 10, 2023
9a4a923
resize image with 'h'
noahbei Jun 10, 2023
c2acff2
Apply suggestions from code review
noahbei Jun 11, 2023
44ce820
apply suggestions from review
noahbei Jun 11, 2023
7ec446d
Merge branch '4x3-experimental' of https://github.com/noahbei/qmk_fir…
noahbei Jun 11, 2023
9d43ba9
Merge branch 'qmk:master' into 4x3-experimental
noahbei Jun 12, 2023
10ab75b
change switch statement to array lookup for oled
noahbei Jun 13, 2023
f46cb6f
Merge branch '4x3-experimental' of https://github.com/noahbei/qmk_fir…
noahbei Jun 13, 2023
5ce2465
apply code suggestions
noahbei Sep 13, 2023
06bc4d2
Update keyboards/printedpad/printedpad.c
noahbei Sep 21, 2023
f5b9b02
add semicolon
noahbei Sep 21, 2023
f3947f7
Update keyboards/printedpad/printedpad.c
noahbei Sep 26, 2023
9e64317
remove instances of PROGMEM
noahbei Sep 27, 2023
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
add via folder
  • Loading branch information
noahbei committed Mar 31, 2023
commit 57c2eec6521bd81993104439d0ae2c1cb7da2ba8
144 changes: 144 additions & 0 deletions keyboards/magtray4x4/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

//make custom cycle keycode and function in process_user_record
int current_layer = 0;
int current_display_mode = 0;

enum layers {
NUM_P,
ARROW,
NUM2,
NUM3
};

enum custom_keycodes {
KC_00 = SAFE_RANGE,
LAYER_INC
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌───┐
* │TOG│
* ├───┼───┬───┬───┐
* │ 7 │ 8 │ 9 │ + │
* ├───┼───┼───┼───┤
* │ 4 │ 5 │ 6 │ % │
* ├───┼───┼───┼───┤
* │ 1 │ 2 │ 3 │ = │
* ├───┼───┼───┼───┤
* │ 0 │00 │ . │Ent│
* └───┴───┴───┴───┘
*/
[0] = LAYOUT_ortho_5x4(
LAYER_INC,
KC_7, KC_8, KC_9, KC_PPLS,
KC_4, KC_5, KC_6, KC_PERC,
KC_1, KC_2, KC_3, KC_EQL,
KC_0, KC_00, KC_DOT, KC_PENT
),

/*
* ┌───┐
* │TOG│
* ├───┼───┬───┬───┐
* │Hom│ ↑ │PgU│ 3 │
* ├───┼───┼───┼───┤
* │ ← │ │ → │ 2 │
* ├───┼───┼───┤───┤
* │End│ ↓ │PgD│ 1 │
* ├───┼───┼───┤───┤
* │Ins│Spc│Del│Ent│
* └───┴───┴───┘───┘
*/
[1] = LAYOUT_ortho_5x4(
LAYER_INC,
KC_HOME, KC_UP, KC_PGUP, KC_3,
KC_LEFT, XXXXXXX, KC_RGHT, KC_2,
KC_END, KC_DOWN, KC_PGDN, KC_1,
KC_INS, KC_SPC, KC_DEL, KC_PENT
),

/*
* ┌───┐
* │TOG│
* ├───┼───┬───┬───┐
* │ 7 │ 8 │ 9 │ + │
* ├───┼───┼───┼───┤
* │ 4 │ 5 │ 6 │ % │
* ├───┼───┼───┼───┤
* │ 1 │ 2 │ 3 │ = │
* ├───┼───┼───┼───┤
* │ 0 │00 │ . │Ent│
* └───┴───┴───┴───┘
*/
[2] = LAYOUT_ortho_5x4(
LAYER_INC,
KC_7, KC_8, KC_9, KC_PPLS,
KC_4, KC_5, KC_6, KC_PERC,
KC_1, KC_2, KC_3, KC_EQL,
KC_0, KC_00, KC_DOT, KC_PENT
),

/*
* ┌───┐
* │TOG│
* ├───┼───┬───┬───┐
* │ 7 │ 8 │ 9 │ + │
* ├───┼───┼───┼───┤
* │ 4 │ 5 │ 6 │ % │
* ├───┼───┼───┼───┤
* │ 1 │ 2 │ 3 │ = │
* ├───┼───┼───┼───┤
* │ 0 │00 │ . │Ent│
* └───┴───┴───┴───┘
*/
[3] = LAYOUT_ortho_5x4(
LAYER_INC,
KC_7, KC_8, KC_9, KC_PPLS,
KC_4, KC_5, KC_6, KC_PERC,
KC_1, KC_2, KC_3, KC_EQL,
KC_0, KC_00, KC_DOT, KC_PENT
)
};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch(keycode) {
case KC_00:
tap_code(KC_0);
tap_code(KC_0);
return false;
case LAYER_INC:
layer_move(++current_layer % 4);
return false;
}
}
return true;
}

// when the layer is changed, flash the layer number on the screen
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case 0:
// flash layer 1 on the screen. write function for this
break;
case 1:
// if display != 2 flash layer on screen,
// else cycle picture (maybe function?)
break;
case 2:

break;
case 3:

break;
default: // for any other layers, or the default layer

break;
}
return state;
}
1 change: 1 addition & 0 deletions keyboards/magtray4x4/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VIA_ENABLE = yes