From dbdbbbd5c9b1458f682eec661d0a17f91dccb4dc Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 26 Sep 2018 12:17:54 -0700 Subject: Keyboard: Refactor XMMX keyboard to XMMX and Toad (#3955) * pull out toad keyboard and get it compiling * refactor xmmx * use the correct LAYOUT macros * move LED code out to toad.c file * move LED code out to xmmx.c file * adjust for correct number of columns and pins used * remove led set user --- keyboards/xmmx/keymaps/ansi_wk/keymap.c | 13 ++++ keyboards/xmmx/keymaps/ansi_wkl/keymap.c | 13 ++++ keyboards/xmmx/keymaps/default/keymap.c | 21 +----- keyboards/xmmx/keymaps/iso_wk/keymap.c | 13 ++++ keyboards/xmmx/keymaps/iso_wkl/keymap.c | 13 ++++ keyboards/xmmx/keymaps/toad/keymap.c | 30 --------- keyboards/xmmx/keymaps/toad_ansi_wk/keymap.c | 30 --------- keyboards/xmmx/keymaps/toad_ansi_wkl/keymap.c | 30 --------- keyboards/xmmx/keymaps/toad_iso_wk/keymap.c | 30 --------- keyboards/xmmx/keymaps/toad_iso_wkl/keymap.c | 30 --------- keyboards/xmmx/keymaps/xmmx_ansi_wk/keymap.c | 30 --------- keyboards/xmmx/keymaps/xmmx_ansi_wkl/keymap.c | 30 --------- keyboards/xmmx/keymaps/xmmx_iso_wk/keymap.c | 30 --------- keyboards/xmmx/keymaps/xmmx_iso_wkl/keymap.c | 30 --------- keyboards/xmmx/readme.md | 8 +-- keyboards/xmmx/xmmx.c | 17 +++++ keyboards/xmmx/xmmx.h | 96 ++------------------------- 17 files changed, 77 insertions(+), 387 deletions(-) create mode 100644 keyboards/xmmx/keymaps/ansi_wk/keymap.c create mode 100644 keyboards/xmmx/keymaps/ansi_wkl/keymap.c create mode 100644 keyboards/xmmx/keymaps/iso_wk/keymap.c create mode 100644 keyboards/xmmx/keymaps/iso_wkl/keymap.c delete mode 100644 keyboards/xmmx/keymaps/toad/keymap.c delete mode 100644 keyboards/xmmx/keymaps/toad_ansi_wk/keymap.c delete mode 100644 keyboards/xmmx/keymaps/toad_ansi_wkl/keymap.c delete mode 100644 keyboards/xmmx/keymaps/toad_iso_wk/keymap.c delete mode 100644 keyboards/xmmx/keymaps/toad_iso_wkl/keymap.c delete mode 100644 keyboards/xmmx/keymaps/xmmx_ansi_wk/keymap.c delete mode 100644 keyboards/xmmx/keymaps/xmmx_ansi_wkl/keymap.c delete mode 100644 keyboards/xmmx/keymaps/xmmx_iso_wk/keymap.c delete mode 100644 keyboards/xmmx/keymaps/xmmx_iso_wkl/keymap.c (limited to 'keyboards/xmmx') diff --git a/keyboards/xmmx/keymaps/ansi_wk/keymap.c b/keyboards/xmmx/keymaps/ansi_wk/keymap.c new file mode 100644 index 0000000000..abdba99ba7 --- /dev/null +++ b/keyboards/xmmx/keymaps/ansi_wk/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_ansi_wk( + 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_PSCR, KC_SLCK, KC_PAUS, \ + 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_BSPC, KC_INS,KC_HOME, KC_PGUP, \ + 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, 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_LSFT, 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_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ) +}; diff --git a/keyboards/xmmx/keymaps/ansi_wkl/keymap.c b/keyboards/xmmx/keymaps/ansi_wkl/keymap.c new file mode 100644 index 0000000000..aeb61ff2ca --- /dev/null +++ b/keyboards/xmmx/keymaps/ansi_wkl/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_ansi_wkl( + 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_PSCR, KC_SLCK, KC_PAUS, \ + 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_BSPC, KC_INS,KC_HOME, KC_PGUP, \ + 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, 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_LSFT, 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_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ) +}; diff --git a/keyboards/xmmx/keymaps/default/keymap.c b/keyboards/xmmx/keymaps/default/keymap.c index 6b0a114328..a7522fe25a 100644 --- a/keyboards/xmmx/keymaps/default/keymap.c +++ b/keyboards/xmmx/keymaps/default/keymap.c @@ -1,8 +1,8 @@ -#include "xmmx.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + LAYOUT_all( 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_PSCR, KC_SLCK, KC_PAUS, \ 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_BSPC, KC_BSPC, KC_INS,KC_HOME, KC_PGUP, \ 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_DEL, KC_END, KC_PGDN, \ @@ -11,20 +11,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT ) }; - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} diff --git a/keyboards/xmmx/keymaps/iso_wk/keymap.c b/keyboards/xmmx/keymaps/iso_wk/keymap.c new file mode 100644 index 0000000000..882cb224a6 --- /dev/null +++ b/keyboards/xmmx/keymaps/iso_wk/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_iso_wk( + 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_PSCR, KC_SLCK, KC_PAUS, \ + 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_BSPC, KC_INS,KC_HOME, KC_PGUP, \ + 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS,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_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ) +}; diff --git a/keyboards/xmmx/keymaps/iso_wkl/keymap.c b/keyboards/xmmx/keymaps/iso_wkl/keymap.c new file mode 100644 index 0000000000..18ba79e1f9 --- /dev/null +++ b/keyboards/xmmx/keymaps/iso_wkl/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_iso_wkl( + 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_PSCR, KC_SLCK, KC_PAUS, \ + 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_BSPC, KC_INS,KC_HOME, KC_PGUP, \ + 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS,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_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ) +}; diff --git a/keyboards/xmmx/keymaps/toad/keymap.c b/keyboards/xmmx/keymaps/toad/keymap.c deleted file mode 100644 index c13dc8f671..0000000000 --- a/keyboards/xmmx/keymaps/toad/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "xmmx.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - TOAD_KEYMAP( - 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_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_BSPC, KC_BSPC, \ - 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL - ) -}; - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} diff --git a/keyboards/xmmx/keymaps/toad_ansi_wk/keymap.c b/keyboards/xmmx/keymaps/toad_ansi_wk/keymap.c deleted file mode 100644 index 5e61dfffbb..0000000000 --- a/keyboards/xmmx/keymaps/toad_ansi_wk/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "xmmx.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - TOAD_KEYMAP_ANSI_WK( - 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_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_BSPC, \ - 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_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL - ) -}; - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} diff --git a/keyboards/xmmx/keymaps/toad_ansi_wkl/keymap.c b/keyboards/xmmx/keymaps/toad_ansi_wkl/keymap.c deleted file mode 100644 index 7778b06521..0000000000 --- a/keyboards/xmmx/keymaps/toad_ansi_wkl/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "xmmx.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - TOAD_KEYMAP_ANSI_WKL( - 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_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_BSPC, \ - 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_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL - ) -}; - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} diff --git a/keyboards/xmmx/keymaps/toad_iso_wk/keymap.c b/keyboards/xmmx/keymaps/toad_iso_wk/keymap.c deleted file mode 100644 index c51ff862a0..0000000000 --- a/keyboards/xmmx/keymaps/toad_iso_wk/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "xmmx.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - TOAD_KEYMAP_ISO_WK( - 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_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_BSPC, \ - 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL - ) -}; - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} diff --git a/keyboards/xmmx/keymaps/toad_iso_wkl/keymap.c b/keyboards/xmmx/keymaps/toad_iso_wkl/keymap.c deleted file mode 100644 index efcebc713b..0000000000 --- a/keyboards/xmmx/keymaps/toad_iso_wkl/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "xmmx.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - TOAD_KEYMAP_ISO_WKL( - 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_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_BSPC, \ - 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL - ) -}; - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} diff --git a/keyboards/xmmx/keymaps/xmmx_ansi_wk/keymap.c b/keyboards/xmmx/keymaps/xmmx_ansi_wk/keymap.c deleted file mode 100644 index 20d55c1fd5..0000000000 --- a/keyboards/xmmx/keymaps/xmmx_ansi_wk/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "xmmx.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - KEYMAP_ANSI_WK( - 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_PSCR, KC_SLCK, KC_PAUS, \ - 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_BSPC, KC_INS,KC_HOME, KC_PGUP, \ - 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_DEL, KC_END, KC_PGDN, \ - KC_CAPS, 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_LSFT, 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_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ) -}; - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} diff --git a/keyboards/xmmx/keymaps/xmmx_ansi_wkl/keymap.c b/keyboards/xmmx/keymaps/xmmx_ansi_wkl/keymap.c deleted file mode 100644 index 3c8ba436f0..0000000000 --- a/keyboards/xmmx/keymaps/xmmx_ansi_wkl/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "xmmx.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - KEYMAP_ANSI_WKL( - 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_PSCR, KC_SLCK, KC_PAUS, \ - 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_BSPC, KC_INS,KC_HOME, KC_PGUP, \ - 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_DEL, KC_END, KC_PGDN, \ - KC_CAPS, 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_LSFT, 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_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ) -}; - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} diff --git a/keyboards/xmmx/keymaps/xmmx_iso_wk/keymap.c b/keyboards/xmmx/keymaps/xmmx_iso_wk/keymap.c deleted file mode 100644 index ee68253c7e..0000000000 --- a/keyboards/xmmx/keymaps/xmmx_iso_wk/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "xmmx.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - KEYMAP_ISO_WK( - 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_PSCR, KC_SLCK, KC_PAUS, \ - 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_BSPC, KC_INS,KC_HOME, KC_PGUP, \ - 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_DEL, KC_END, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS,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_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ) -}; - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} diff --git a/keyboards/xmmx/keymaps/xmmx_iso_wkl/keymap.c b/keyboards/xmmx/keymaps/xmmx_iso_wkl/keymap.c deleted file mode 100644 index c27914e451..0000000000 --- a/keyboards/xmmx/keymaps/xmmx_iso_wkl/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "xmmx.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - KEYMAP_ISO_WKL( - 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_PSCR, KC_SLCK, KC_PAUS, \ - 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_BSPC, KC_INS,KC_HOME, KC_PGUP, \ - 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_DEL, KC_END, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS,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_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ) -}; - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} diff --git a/keyboards/xmmx/readme.md b/keyboards/xmmx/readme.md index cf16231e17..8f94df4b92 100644 --- a/keyboards/xmmx/readme.md +++ b/keyboards/xmmx/readme.md @@ -1,20 +1,14 @@ -XMMX and Toad -======== +# XMMX XMMX: Tenkeyless Mechanical Keyboard PCB designed to fit Filco Majestouch TKL and Cooler Master Quickfire Rapid cases -Toad: 70% Mechanical Keyboard PCB. XMMX schematic and PCB are available opensource under Creative Commons BY-SA 3.0 license on EasyEDA at [this link](https://easyeda.com/farmakon/XMMX-0447d28c1e4644b88fd04905d983684d) -Toad schematic and PCB are available opensource under Creative Commons BY-SA 3.0 license on EasyEDA at [this link](https://easyeda.com/farmakon/70_Keyboard-d4f6baf4792d4ada9c0571fa3713e461) For more informations on the XMMX please visit this [geekhack.org thread](https://geekhack.org/index.php?topic=93422.0) -For more informations on the Toad please visit this [geekhack.org thread](https://geekhack.org/index.php?topic=91388.0) Make examples for these keyboards (after setting up your build environment): make xmmx:default - make xmmx:toad - See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/xmmx/xmmx.c b/keyboards/xmmx/xmmx.c index 399ae4eb44..4d410e90a0 100644 --- a/keyboards/xmmx/xmmx.c +++ b/keyboards/xmmx/xmmx.c @@ -1 +1,18 @@ #include "xmmx.h" + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/xmmx.h b/keyboards/xmmx/xmmx.h index ad6ae30146..22d0f1480d 100644 --- a/keyboards/xmmx/xmmx.h +++ b/keyboards/xmmx/xmmx.h @@ -4,7 +4,7 @@ #include "quantum.h" // 80% keyboard: default - all keys -#define KEYMAP( \ +#define LAYOUT_all( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K013, K114, K115, K116, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ @@ -21,7 +21,7 @@ } // 80% keyboard: ANSI Winkey -#define KEYMAP_ANSI_WK( \ +#define LAYOUT_ansi_wk( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ @@ -38,7 +38,7 @@ } // 80% keyboard: ANSI Winkeyless -#define KEYMAP_ANSI_WKL( \ +#define LAYOUT_ansi_wkl( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ @@ -55,7 +55,7 @@ } // 80% keyboard: ISO Winkey -#define KEYMAP_ISO_WK( \ +#define LAYOUT_iso_wk( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, \ @@ -72,7 +72,7 @@ } // 80% keyboard: ISO Winkeyless -#define KEYMAP_ISO_WKL( \ +#define LAYOUT_iso_wkl( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, \ @@ -88,90 +88,4 @@ { K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513, K514, K515, K516 } \ } - -// 70% keyboard: default - all keys -#define TOAD_KEYMAP( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K013, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ - K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ - K500, K501, K502, K507, K510, K511, K512, K513 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413 }, \ - { K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513 } \ -} - -// 70% keyboard: ANSI Winkey -#define TOAD_KEYMAP_ANSI_WK( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ - K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \ - K500, K501, K502, K507, K510, K511, K512, K513 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO,K313 }, \ - { K400, KC_NO,K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \ - { K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513 } \ -} - -// 70% keyboard: ANSI Winkeyless -#define TOAD_KEYMAP_ANSI_WKL( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ - K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \ - K500, K502, K507, K511, K513 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO,K313 }, \ - { K400, KC_NO,K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \ - { K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513 } \ -} - -// 70% keyboard: ISO Winkey -#define TOAD_KEYMAP_ISO_WK( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ - K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \ - K500, K501, K502, K507, K510, K511, K512, K513 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO}, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \ - { K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513 } \ -} - -// 70% keyboard: ISO Winkeyless -#define TOAD_KEYMAP_ISO_WKL( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ - K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \ - K500, K502, K507, K511, K513 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO}, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \ - { K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513 } \ -} - #endif -- cgit v1.2.3