qmk

QMK Firmware
git clone git://git.z3bra.org/qmk.git
Log | Files | Refs | Submodules | LICENSE

keymap.c (1140B)


      1 #include QMK_KEYBOARD_H
      2 
      3 #define FN1_Q LT(1, KC_Q)
      4 
      5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
      6 
      7   [0] = LAYOUT_ortho_3x10(
      8     FN1_Q,   KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,
      9     KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_ESC,
     10     KC_Z,    KC_X,    KC_C,    KC_V,    KC_BSPC, KC_SPC,  KC_B,    KC_N,    KC_M,    KC_ENT
     11   ),
     12 
     13   [1] = LAYOUT_ortho_3x10(
     14     _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
     15     _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_INC,
     16     _______, _______, _______, _______, _______, _______, RESET,   _______, _______, BL_DEC
     17   ),
     18 
     19 };
     20 
     21 void keyboard_pre_init_user(void) {
     22   // Call the keyboard pre init code.
     23 
     24   // Set our LED pins as output
     25   setPinOutput(D5);
     26   setPinOutput(B0);
     27 }
     28 
     29 void led_set_user(uint8_t usb_led) {
     30   if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
     31     writePinLow(D5);
     32   } else {
     33     writePinHigh(D5);
     34   }
     35 
     36   if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
     37     writePinLow(B0);
     38   } else {
     39     writePinHigh(B0);
     40   }
     41 }