Skip to content

Open-source keyboard firmware for Atmel AVR and Arm USB families

License

GPL-2.0, GPL-2.0 licenses found

Licenses found

GPL-2.0
LICENSE
GPL-2.0
license_GPLv2.md
Notifications You must be signed in to change notification settings

the-mikedavis/keyboards

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantum Mechanical Keyboard Firmware

This is my fork of QMK with my board configs.

I have a...

  • Corne (crkbd)
  • Planck
  • Let's Split, Eh?

And I use a custom key layout based on Programmer's Dvorak.

Building

git clone git@github.com:the-mikedavis/qmk_firmware.git
cd qmk_firmware
git submodule update --init --force
nix-shell
qmk compile -kb crkbd -km the-mikedavis

produces a crkbd_rev1_the-mikedavis.hex file.

Then I use QMK-toolbox on a Windows/MacOS machine to flash (it gets complicated to do it on NixOS).

Tricks

I use a lot of snake_case so I switched KC_MINUS to send _ with no shift modifier and - with the shift modifier. This is easy but not trivial with QMK:

// setup a custom keycode
enum custom_keycodes {
  REV_MINUS = SAFE_RANGE,
};

// replace KC_MINUS with REV_MINUS in your keymaps block:
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  // ...
}

// implement process_record_user
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  // check for record->event.pressed (keydown) and that the keycode was our
  // custom keycode
  if (record->event.pressed && keycode == REV_MINUS) {
    // if the shift mod is currently registered
    if (get_mods() & MOD_MASK_SHIFT) {
      // unregister it, send `-`, then reregister it.
      // (we need to do this because the operating system will see shift held
      // and `-` sent and convert it to `_`.)
      unregister_code(KC_LSFT);
      SEND_STRING("-");
      register_code(KC_LSFT);
    } else {
      // if not shifted, send a literal `_`
      SEND_STRING("_");
    }
  }
  return true;
}

See 0211661.

This can be done for macos as well: 9778486.

About

Open-source keyboard firmware for Atmel AVR and Arm USB families

Resources

License

GPL-2.0, GPL-2.0 licenses found

Licenses found

GPL-2.0
LICENSE
GPL-2.0
license_GPLv2.md

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 93.7%
  • Makefile 3.2%
  • C++ 2.4%
  • Python 0.6%
  • Shell 0.1%
  • Roff 0.0%