Skip to content

Instantly share code, notes, and snippets.

@ethan605
Last active April 18, 2020 04:43
Show Gist options
  • Save ethan605/58febfb29030af68c52f1cfe6d611f24 to your computer and use it in GitHub Desktop.
Save ethan605/58febfb29030af68c52f1cfe6d611f24 to your computer and use it in GitHub Desktop.
Mechanical keyboards

1. Flash instructions

  1. Install Homebrew.
  2. Download and install QMK Toolbox. NOTE: If the application can't be opened normally, may be it's lacking libusb library:
  $ brew install libusb
  1. Run commands:
  $ git clone https://github.com/qmk/qmk_firmware.git
  $ cd qmk_firmware
  $ ./util/qmk_install.sh
  1. Create a new folder under ./keyboards/kbd75/keymaps/ (e.g ./keyboards/kbd75/keymaps/<profile_name>), save the file keymap.c to the new folder.

  2. Modify the keymap with the features and keycodes listed here (NOTE: Do not forget to include a Fn key (MO(1)) or the keyboard won't be able to be flashed successfully and may cause irreparable damage to the PCB).

  3. Save the file keymap.c.

  4. Run command:

  $ make kbd75:<profile_name> # replace 'profile_name' with the folder name in step 4.
  1. Now there're 2 ways to flash the keyboard:
  • 8.1. Using QMK Toolbox:

    • Click the Open button and navigate to the QMK Firmware folder and select the file kbd75_<profile_name>.hex
    • Press Fn + Backspace to put the keyboard into Bootloader mode (a.k.a., Flash Mode), in the QMK Toolbox console should appear DFU connected.
    • Click the Flash button
    • Once DFU disconnected appears, the keyboard flash is done!
  • 8.2. Using terminal:

    • Press Fn + Backspace to put the keyboard into Bootloader mode (a.k.a., Flash Mode). Now the keyboard couldn't be typed (only for temporarily).
    • Run the command make kbd75:<profile_name>:dfu
    • Wait until the success message appears:
...
Validating...  Success
0x... bytes written into 0x... bytes memory (xx.yy%).

2. LED functions

Keys LED feature Function
Fn + q RGB Toggle ON/OFF
Fn + w RGB Switch mode
Fn + e RGB HUE +
Fn + r RGB HUE -
Fn + t RGB Saturaion +
Fn + y RGB Saturaion -
Fn + u RGB Brightness +
Fn + i RGB Brightness -
Fn + c Backlid Brightness -
Fn + v Backlid Toggle ON/OFF
Fn + b Backlid Brightness +
Fn + n Backlid Switch mode
#include QMK_KEYBOARD_H
#define _______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: Qwerty layer
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
* │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ INS │ DEL │ FN │
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ BSPC │HOME │
* ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤
* │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ BSLS │END │
* ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
* │ LCTRL │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │PGUP │
* ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
* │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RSHFT │ UP │PGDN │
* ├──────┬─────┴─┬───┴──┬──┴─────┴─────┴─────┴─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
* │ CAPS │ LALT │ LCMD │ SPC │RCMD │RALT │RCTL │LEFT │DOWN │RIGHT│
* └──────┴───────┴──────┴─────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
*/
[0] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, MO(1),
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, MO(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_CAPS, KC_LALT, KC_LCMD, KC_SPC, KC_SPC, KC_SPC, KC_RCMD, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* 1: Function layer
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ FN │
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ RESET │ │
* ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤
* │ │ TOG │ MOD │ HU+ │ HU- │ SA+ │ SA- │ VA+ │ VA- │ │ │ │ │ │ │ // RGB controls
* ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
* ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
* │ │ │ │ │ DEC │ TOG │ INC │STEP │ │ │ │ │ │ │ // Backlight controls
* ├──────┬─────┴─┬───┴──┬──┴─────┴─────┴─────┴─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
* │ │ │ │ │ │ │ │ │ │ │
* └──────┴───────┴──────┴─────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
*/
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______,
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
} else {
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment