From 7e5c107d43890eb517184d6fddff9a6da165fc3d Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 4 Apr 2019 15:16:59 -0700 Subject: [Keyboard] Move scrabblepad into donutcables directory (#5553) * move scrabblepad into donutcables directory * use pragma once * update scrabblepad readme --- keyboards/donutcables/scrabblepad/config.h | 189 +++++++++++++++++++++ keyboards/donutcables/scrabblepad/info.json | 12 ++ .../scrabblepad/keymaps/default/config.h | 19 +++ .../scrabblepad/keymaps/default/keymap.c | 68 ++++++++ .../scrabblepad/keymaps/default/readme.md | 6 + .../scrabblepad/keymaps/random/keymap.c | 75 ++++++++ .../scrabblepad/keymaps/random/readme.md | 5 + keyboards/donutcables/scrabblepad/readme.md | 17 ++ keyboards/donutcables/scrabblepad/rules.mk | 67 ++++++++ keyboards/donutcables/scrabblepad/scrabblepad.c | 43 +++++ keyboards/donutcables/scrabblepad/scrabblepad.h | 54 ++++++ 11 files changed, 555 insertions(+) create mode 100644 keyboards/donutcables/scrabblepad/config.h create mode 100644 keyboards/donutcables/scrabblepad/info.json create mode 100644 keyboards/donutcables/scrabblepad/keymaps/default/config.h create mode 100644 keyboards/donutcables/scrabblepad/keymaps/default/keymap.c create mode 100644 keyboards/donutcables/scrabblepad/keymaps/default/readme.md create mode 100644 keyboards/donutcables/scrabblepad/keymaps/random/keymap.c create mode 100644 keyboards/donutcables/scrabblepad/keymaps/random/readme.md create mode 100644 keyboards/donutcables/scrabblepad/readme.md create mode 100644 keyboards/donutcables/scrabblepad/rules.mk create mode 100644 keyboards/donutcables/scrabblepad/scrabblepad.c create mode 100644 keyboards/donutcables/scrabblepad/scrabblepad.h (limited to 'keyboards/donutcables') diff --git a/keyboards/donutcables/scrabblepad/config.h b/keyboards/donutcables/scrabblepad/config.h new file mode 100644 index 000000000..bf3d3db72 --- /dev/null +++ b/keyboards/donutcables/scrabblepad/config.h @@ -0,0 +1,189 @@ +/* +Copyright 2018 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Donut Cables +#define PRODUCT ScrabblePad +#define DESCRIPTION 15x15 Ortholinear Board + +/* key matrix size */ +#define MATRIX_ROWS 15 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D5, F1, C7, F2, C6, F3, C5, F4, C4, F5, C3, F6, C2, F7, C1 } +#define MATRIX_COL_PINS { D6, D7, E0, E1, B7, D2, D3, D4, C0, B4, B5, B6, F0, E6, E7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// ws2812 options +//#define RGB_DI_PIN A0 // pin the DI on the ws2812 is hooked-up to +//#define RGBLIGHT_ANIMATIONS // run RGB animations +//#define RGBLED_NUM 6 // number of LEDs +//#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +//#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +//#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/donutcables/scrabblepad/info.json b/keyboards/donutcables/scrabblepad/info.json new file mode 100644 index 000000000..1368abd4b --- /dev/null +++ b/keyboards/donutcables/scrabblepad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "scrabblepad", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 15, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":0, "y":5}, {"x":1, "y":5}, {"x":2, "y":5}, {"x":3, "y":5}, {"x":4, "y":5}, {"x":5, "y":5}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":8, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":11, "y":5}, {"x":12, "y":5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":0, "y":6}, {"x":1, "y":6}, {"x":2, "y":6}, {"x":3, "y":6}, {"x":4, "y":6}, {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":8, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, {"x":12, "y":6}, {"x":13, "y":6}, {"x":14, "y":6}, {"x":0, "y":7}, {"x":1, "y":7}, {"x":2, "y":7}, {"x":3, "y":7}, {"x":4, "y":7}, {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":8, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}, {"x":12, "y":7}, {"x":13, "y":7}, {"x":14, "y":7}, {"x":0, "y":8}, {"x":1, "y":8}, {"x":2, "y":8}, {"x":3, "y":8}, {"x":4, "y":8}, {"x":5, "y":8}, {"x":6, "y":8}, {"x":7, "y":8}, {"x":8, "y":8}, {"x":9, "y":8}, {"x":10, "y":8}, {"x":11, "y":8}, {"x":12, "y":8}, {"x":13, "y":8}, {"x":14, "y":8}, {"x":0, "y":9}, {"x":1, "y":9}, {"x":2, "y":9}, {"x":3, "y":9}, {"x":4, "y":9}, {"x":5, "y":9}, {"x":6, "y":9}, {"x":7, "y":9}, {"x":8, "y":9}, {"x":9, "y":9}, {"x":10, "y":9}, {"x":11, "y":9}, {"x":12, "y":9}, {"x":13, "y":9}, {"x":14, "y":9}, {"x":0, "y":10}, {"x":1, "y":10}, {"x":2, "y":10}, {"x":3, "y":10}, {"x":4, "y":10}, {"x":5, "y":10}, {"x":6, "y":10}, {"x":7, "y":10}, {"x":8, "y":10}, {"x":9, "y":10}, {"x":10, "y":10}, {"x":11, "y":10}, {"x":12, "y":10}, {"x":13, "y":10}, {"x":14, "y":10}, {"x":0, "y":11}, {"x":1, "y":11}, {"x":2, "y":11}, {"x":3, "y":11}, {"x":4, "y":11}, {"x":5, "y":11}, {"x":6, "y":11}, {"x":7, "y":11}, {"x":8, "y":11}, {"x":9, "y":11}, {"x":10, "y":11}, {"x":11, "y":11}, {"x":12, "y":11}, {"x":13, "y":11}, {"x":14, "y":11}, {"x":0, "y":12}, {"x":1, "y":12}, {"x":2, "y":12}, {"x":3, "y":12}, {"x":4, "y":12}, {"x":5, "y":12}, {"x":6, "y":12}, {"x":7, "y":12}, {"x":8, "y":12}, {"x":9, "y":12}, {"x":10, "y":12}, {"x":11, "y":12}, {"x":12, "y":12}, {"x":13, "y":12}, {"x":14, "y":12}, {"x":0, "y":13}, {"x":1, "y":13}, {"x":2, "y":13}, {"x":3, "y":13}, {"x":4, "y":13}, {"x":5, "y":13}, {"x":6, "y":13}, {"x":7, "y":13}, {"x":8, "y":13}, {"x":9, "y":13}, {"x":10, "y":13}, {"x":11, "y":13}, {"x":12, "y":13}, {"x":13, "y":13}, {"x":14, "y":13}, {"x":0, "y":14}, {"x":1, "y":14}, {"x":2, "y":14}, {"x":3, "y":14}, {"x":4, "y":14}, {"x":5, "y":14}, {"x":6, "y":14}, {"x":7, "y":14}, {"x":8, "y":14}, {"x":9, "y":14}, {"x":10, "y":14}, {"x":11, "y":14}, {"x":12, "y":14}, {"x":13, "y":14}, {"x":14, "y":14}] + } + } +} diff --git a/keyboards/donutcables/scrabblepad/keymaps/default/config.h b/keyboards/donutcables/scrabblepad/keymaps/default/config.h new file mode 100644 index 000000000..a3ed4f762 --- /dev/null +++ b/keyboards/donutcables/scrabblepad/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c new file mode 100644 index 000000000..6f97d87e1 --- /dev/null +++ b/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2018 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC \ +), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/donutcables/scrabblepad/keymaps/default/readme.md b/keyboards/donutcables/scrabblepad/keymaps/default/readme.md new file mode 100644 index 000000000..4123e7667 --- /dev/null +++ b/keyboards/donutcables/scrabblepad/keymaps/default/readme.md @@ -0,0 +1,6 @@ +# The default keymap for ScrabblePad + +This is the default keymap for the ScrabblePad. + +On each row, each key is used to spell out each character in +the following string: "donutcat rules ". diff --git a/keyboards/donutcables/scrabblepad/keymaps/random/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/random/keymap.c new file mode 100644 index 000000000..8e7825966 --- /dev/null +++ b/keyboards/donutcables/scrabblepad/keymaps/random/keymap.c @@ -0,0 +1,75 @@ +#include "scrabblepad.h" +#include + +static uint16_t keystroke; +static bool shift_pressed; + +static int lower = (int) KC_A; +static int upper = (int) KC_Z; + +uint16_t random_keycode(void) { + return lower + (rand() % (upper - lower + 1)); +}; + +enum custom_keycodes { + RND_KEY = SAFE_RANGE +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case RND_KEY: + if (record->event.pressed) { + keystroke = random_keycode(); + if (rand() % 2 > 0) { + shift_pressed = 1; + register_code(KC_LSHIFT); + } + register_code(keystroke); + } else { + if (shift_pressed > 0) { + unregister_code(KC_LSHIFT); + } + unregister_code(keystroke); + } + + return false; + + default: + return true; + } + + return true; +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RESET, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, \ + RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY +), +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/donutcables/scrabblepad/keymaps/random/readme.md b/keyboards/donutcables/scrabblepad/keymaps/random/readme.md new file mode 100644 index 000000000..e719adaeb --- /dev/null +++ b/keyboards/donutcables/scrabblepad/keymaps/random/readme.md @@ -0,0 +1,5 @@ +# Scrabblepad keymap with every key press random + +Every key produces a random key press, except the middle key, which is reserved for resetting the board. + +The random key press is selected between KC_A and KC_Z keycodes. diff --git a/keyboards/donutcables/scrabblepad/readme.md b/keyboards/donutcables/scrabblepad/readme.md new file mode 100644 index 000000000..f0b05cbce --- /dev/null +++ b/keyboards/donutcables/scrabblepad/readme.md @@ -0,0 +1,17 @@ +# ScrabblePad + +The ScrabblePad is a 15x15 ortholinear keyboard designed for use with +the XDA Scrabble Board sold by [Novelkeys](https://novelkeys.xyz). + +It uses a [Teensy++ 2.0](https://www.pjrc.com/store/teensypp.html) +featuring an at90usb1286 8 bit microcontroller. Usage requires modifying the Teensy by removing the LED on pin D6. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Donut Cables](https://donutcables.com/) +Hardware Supported: Teensy++ 2.0 and ScrabblePad PCB +Hardware Availability: [Donut Cables](https://donutcables.com/) + +Make example for this keyboard (after setting up your build environment): + + make donutcables/scrabblepad:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/donutcables/scrabblepad/rules.mk b/keyboards/donutcables/scrabblepad/rules.mk new file mode 100644 index 000000000..20f532af4 --- /dev/null +++ b/keyboards/donutcables/scrabblepad/rules.mk @@ -0,0 +1,67 @@ +# MCU name +MCU = at90usb1286 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/donutcables/scrabblepad/scrabblepad.c b/keyboards/donutcables/scrabblepad/scrabblepad.c new file mode 100644 index 000000000..e97cbd46c --- /dev/null +++ b/keyboards/donutcables/scrabblepad/scrabblepad.c @@ -0,0 +1,43 @@ +/* Copyright 2018 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "scrabblepad.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/donutcables/scrabblepad/scrabblepad.h b/keyboards/donutcables/scrabblepad/scrabblepad.h new file mode 100644 index 000000000..b4ac8b2c4 --- /dev/null +++ b/keyboards/donutcables/scrabblepad/scrabblepad.h @@ -0,0 +1,54 @@ +/* Copyright 2018 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +// Written in the format K(row)(column) where numbering is in hexadecimal +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, \ + k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, \ + k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, k7B, k7C, k7D, k7E, \ + k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8A, k8B, k8C, k8D, k8E, \ + k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, k9A, k9B, k9C, k9D, k9E, \ + kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8, kA9, kAA, kAB, kAC, kAD, kAE, \ + kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8, kB9, kBA, kBB, kBC, kBD, kBE, \ + kC0, kC1, kC2, kC3, kC4, kC5, kC6, kC7, kC8, kC9, kCA, kCB, kCC, kCD, kCE, \ + kD0, kD1, kD2, kD3, kD4, kD5, kD6, kD7, kD8, kD9, kDA, kDB, kDC, kDD, kDE, \ + kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, kE8, kE9, kEA, kEB, kEC, kED, kEE \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, k7B, k7C, k7D, k7E, }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8A, k8B, k8C, k8D, k8E, }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, k9A, k9B, k9C, k9D, k9E, }, \ + { kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8, kA9, kAA, kAB, kAC, kAD, kAE, }, \ + { kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8, kB9, kBA, kBB, kBC, kBD, kBE, }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, kC6, kC7, kC8, kC9, kCA, kCB, kCC, kCD, kCE, }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, kD6, kD7, kD8, kD9, kDA, kDB, kDC, kDD, kDE, }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, kE8, kE9, kEA, kEB, kEC, kED, kEE } \ +} -- cgit v1.2.3-24-g4f1b