From 4ebecc424e7f4beeb6985faf0ed9199823fa648f Mon Sep 17 00:00:00 2001 From: Dmitry Nosachev Date: Tue, 17 Dec 2019 08:42:03 +0300 Subject: [PATCH] [Keyboard] Magnavox Videowriter conversion with Pro Micro (#7634) * Magnavox Videowriter convertion * Magnavox Videowriter: readme, images * Update keyboards/handwired/videowriter/info.json * Update keyboards/handwired/videowriter/README.md * Update keyboards/handwired/videowriter/README.md * Update keyboards/handwired/videowriter/info.json * Update keyboards/handwired/videowriter/info.json * Update keyboards/handwired/videowriter/info.json * Update keyboards/handwired/videowriter/info.json * Update keyboards/handwired/videowriter/info.json * suggested changes * suggested changes * fix comment symbol * Update keyboards/handwired/videowriter/rules.mk * Update keyboards/handwired/videowriter/rules.mk * Update keyboards/handwired/videowriter/rules.mk --- keyboards/handwired/videowriter/README.md | 61 ++++++++ keyboards/handwired/videowriter/config.h | 140 ++++++++++++++++++ keyboards/handwired/videowriter/info.json | 20 +++ .../videowriter/keymaps/default/keymap.c | 107 +++++++++++++ .../videowriter/keymaps/default/readme.md | 1 + .../videowriter/keymaps/oleg/config.h | 20 +++ .../videowriter/keymaps/oleg/keymap.c | 108 ++++++++++++++ .../videowriter/keymaps/oleg/rules.mk | 4 + keyboards/handwired/videowriter/rules.mk | 32 ++++ keyboards/handwired/videowriter/videowriter.c | 17 +++ keyboards/handwired/videowriter/videowriter.h | 59 ++++++++ 11 files changed, 569 insertions(+) create mode 100644 keyboards/handwired/videowriter/README.md create mode 100644 keyboards/handwired/videowriter/config.h create mode 100644 keyboards/handwired/videowriter/info.json create mode 100644 keyboards/handwired/videowriter/keymaps/default/keymap.c create mode 100644 keyboards/handwired/videowriter/keymaps/default/readme.md create mode 100644 keyboards/handwired/videowriter/keymaps/oleg/config.h create mode 100644 keyboards/handwired/videowriter/keymaps/oleg/keymap.c create mode 100644 keyboards/handwired/videowriter/keymaps/oleg/rules.mk create mode 100644 keyboards/handwired/videowriter/rules.mk create mode 100644 keyboards/handwired/videowriter/videowriter.c create mode 100644 keyboards/handwired/videowriter/videowriter.h diff --git a/keyboards/handwired/videowriter/README.md b/keyboards/handwired/videowriter/README.md new file mode 100644 index 0000000000..ef8471aa91 --- /dev/null +++ b/keyboards/handwired/videowriter/README.md @@ -0,0 +1,61 @@ +# QMK-based firmware for Magnavox Videowriter keyboard +Matrix layout is based on info from this [article](https://deskthority.net/workshop-f7/magnavox-videowriter-keyboard-cleanup-and-conversion-t19687.html). + +![Videowriter](https://i.imgur.com/zNTHmZa.jpg) + +Magnavox Videowriter keyboard conversion project: direct connection of Pro Micro to the matrix. + +* Keyboard Maintainer: [DmNosachev](https://github.com/DmNosachev) +* Hardware Supported: Alps-based [Magnavox Videowriter keyboard](https://deskthority.net/wiki/Magnavox_VideoWriter), Pro Micro 16MHz 5V MCU board (you can use any MCU which is supported by QMK and has 18 or more IO). + +Make example for this keyboard (after setting up your build environment): + + make handwired/videowriter: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). + +# Modding + +## Matrix + +Videowriter has 8x10 matrix: + +| col/row | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | +|---------|----------|-----------|-----------|-----------|----------|-----------|-----------|---------| +| 0 | | | | | | | 51 LShift | 39 Caps | +| 1 | 08 Copy | 07 Find | 06 Split | 05 Center | 04 Page | 03 Spell | 02 Print | 01 Menu | +| 2 | 16 5 | 15 4 | 14 3 | 13 2 | 12 1 | 11 Delete | 10 GoTo | 09 Move | +| 3 | 24 BkSpc | 23 Equals | 22 Minus | 21 0 | 20 9 | 19 8 | 18 7 | 17 6 | +| 4 | 32 U | 31 Y | 30 T | 29 R | 28 E | 27 W | 26 Q | 25 Tab | +| 5 | 41 S | 40 A | 38 Return | 37 ] | 36 [ | 35 P | 34 O | 33 I | +| 6 | 49 ; | 48 L | 47 K | 46 J | 45 H | 44 G | 43 F | 42 D | +| 7 | 58 M | 57 N | 56 B | 55 V | 54 C | 53 X | 52 Z | 50 " | +| 8 | 67 Left | 66 Up | 65 Insert | 64 Space | 63 Style | 61 / | 60 . | 59 , | +| 9 | | | 62 RShift | 72 Undo | 71 Help | 70 Do | 69 Right | 68 Down | + +## Separating Shift keys +Initially left and right Shift keys are connected in parrallel. You need to cut the traces from right Shift (switch 62) and wire it to column 2 (switch 65, right pin) and row 9 (switch 71, bottom pin). + +![Right shift](https://i.imgur.com/ttdTVtC.jpg) + +## Stock components removal +SN74LS145N IC (BCD-to-decimal decoder, drives matrix rows), NEC D8049HC IC (MCU, drives matrix columns) and resistor array need to be desoldered from the PCB. You need to shorten the 4 diodes (D2–D5) in the bottom right corner of the PCB (solder a wire between their pins). +I've also removed two electrolytic capacitors and some ceramic capacitors just to free an additional space. + +Optional: add diodes between each switch and corresponding row for NKRO. If you choose not to add them, create `config.h` file in your personal keymap folder and add `#define MATRIX_HAS_GHOST` to it. + +## Pro Micro +Suggested mount position for the Pro Micro: + +![PCB bottom side](https://i.imgur.com/bb7zZD0.jpg) + +1. Solder two 8-pin headers to the Pro Micro (pin D1-B5 on the left side and pins F4-B6 on the right side). +2. Solder the Pro Micro to the Videowriter's PCB. +3. Solder 6 wire bridges (pink color on the photo). +4. By this point rows 0-4 and all columns will be already in place. +5. Connect rows 5-9 (see right side of the PCB) to the corresponding pins of the Pro Micro using additional wires. +6. Optional: connect a push button between Reset and Ground pins. + +![PCB top side](https://i.imgur.com/PVEXIxj.jpg) + +Compile and flash the firmware. Use matrix [debug mode](https://docs.qmk.fm/#/feature_command) if something is wrong. diff --git a/keyboards/handwired/videowriter/config.h b/keyboards/handwired/videowriter/config.h new file mode 100644 index 0000000000..d392564eb9 --- /dev/null +++ b/keyboards/handwired/videowriter/config.h @@ -0,0 +1,140 @@ +/* +Copyright 2019 DmNosachev + +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 Magnavox +#define PRODUCT Videowriter +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * 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 { D7, C6, D1, D0, D4, D2, D3, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Uncomment this if you didn't install diodes */ +//#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 + + +/* + * 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. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +//#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* 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_HELP H +//#define MAGIC_KEY_HELP_ALT 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 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#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 B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#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 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/videowriter/info.json b/keyboards/handwired/videowriter/info.json new file mode 100644 index 0000000000..194b558bef --- /dev/null +++ b/keyboards/handwired/videowriter/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "videowriter", + "url": "https://deskthority.net/viewtopic.php?f=7&t=20210", + "maintainer": "DmNosachev", + "width": 16, + "height": 7.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"menu", "x":1, "y":1, "h":0.75}, {"label":"print", "x":2, "y":1, "h":0.75}, {"label":"spell", "x":3, "y":1, "h":0.75}, {"label":"page", "x":4.5, "y":1, "h":0.75}, {"label":"center", "x":5.5, "y":1, "h":0.75}, {"label":"split", "x":6.5, "y":1, "h":0.75}, {"label":"find", "x":7.5, "y":1, "h":0.75}, {"label":"copy", "x":9, "y":1, "h":0.75}, {"label":"move", "x":10, "y":1, "h":0.75}, {"label":"go to", "x":11, "y":1, "h":0.75}, + {"label":"left", "x":13, "y":0.5}, {"label":"down", "x":14, "y":1}, {"label":"up", "x":14, "y":0}, {"label":"right", "x":15, "y":0.5}, + {"label":"del", "x":0, "y":2.5}, {"label":"1", "x":1, "y":2.5}, {"label":"2", "x":2, "y":2.5}, {"label":"3", "x":3, "y":2.5}, {"label":"4", "x":4, "y":2.5}, {"label":"5", "x":5, "y":2.5}, {"label":"6", "x":6, "y":2.5}, {"label":"7", "x":7, "y":2.5}, {"label":"8", "x":8, "y":2.5}, {"label":"9", "x":9, "y":2.5}, {"label":"0", "x":10, "y":2.5}, {"label":"-", "x":11, "y":2.5}, {"label":"=", "x":12, "y":2.5}, {"label":"backspace", "x":13, "y":2.5, "w":1.5}, {"label":"do", "x":15, "y":2.5, "h":1.33}, + {"label":"tab", "x":0, "y":3.5, "w":1.5}, {"label":"Q", "x":1.5, "y":3.5}, {"label":"W", "x":2.5, "y":3.5}, {"label":"E", "x":3.5, "y":3.5}, {"label":"R", "x":4.5, "y":3.5}, {"label":"T", "x":5.5, "y":3.5}, {"label":"Y", "x":6.5, "y":3.5}, {"label":"U", "x":7.5, "y":3.5}, {"label":"I", "x":8.5, "y":3.5}, {"label":"O", "x":9.5, "y":3.5}, {"label":"P", "x":10.5, "y":3.5}, {"label":"[", "x":11.5, "y":3.5}, {"label":"]", "x":12.5, "y":3.5}, {"label":"help", "x":15, "y":3.833, "h":1.33}, + {"label":"caps lock", "x":0, "y":4.5, "w":1.75}, {"label":"A", "x":1.75, "y":4.5}, {"label":"S", "x":2.75, "y":4.5}, {"label":"D", "x":3.75, "y":4.5}, {"label":"F", "x":4.75, "y":4.5}, {"label":"G", "x":5.75, "y":4.5}, {"label":"H", "x":6.75, "y":4.5}, {"label":"J", "x":7.75, "y":4.5}, {"label":"K", "x":8.75, "y":4.5}, {"label":"L", "x":9.75, "y":4.5}, {"label":";", "x":10.75, "y":4.5}, {"label":"'", "x":11.75, "y":4.5}, {"label":"return", "x":12.75, "y":4.5, "w":1.75}, {"label":"undo", "x":15, "y":5.167, "h":1.33}, + {"label":"shift", "x":0, "y":5.5, "w":2.25}, {"label":"Z", "x":2.25, "y":5.5}, {"label":"X", "x":3.25, "y":5.5}, {"label":"C", "x":4.25, "y":5.5}, {"label":"V", "x":5.25, "y":5.5}, {"label":"B", "x":6.25, "y":5.5}, {"label":"N", "x":7.25, "y":5.5}, {"label":"M", "x":8.25, "y":5.5}, {"label":"<", "x":9.25, "y":5.5}, {"label":">", "x":10.25, "y":5.5}, {"label":"?", "x":11.25, "y":5.5}, {"label":"shift", "x":12.25, "y":5.5, "w":2.25}, + {"label":"style", "x":1.25, "y":6.5, "w":1.5}, {"label":"space", "x":2.75, "y":6.5, "w":9}, {"label":"insert", "x":11.75, "y":6.5, "w":1.5} + ] + } + } +} diff --git a/keyboards/handwired/videowriter/keymaps/default/keymap.c b/keyboards/handwired/videowriter/keymaps/default/keymap.c new file mode 100644 index 0000000000..527ee6fffc --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/default/keymap.c @@ -0,0 +1,107 @@ +/* Copyright 2019 DmNosachev + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1 +}; + +// Example of custom keycodes used by macros in process_record_user +/* +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. | up | | + * | |vol- |vol+| mute| | prev| play| stop| next| |prsc|scrlk|ins| |left|down|right| + * |---------------------------------------------------------------------------------------| + * | ~`| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSp| fn1 | + * |---------------------------------------------------------------------------------------| + * |Tab/fn1| Q | W | E | R | T | Y | U | I | O | P | [ | ] | | menu| + * |---------------------------------------------------------------------------------------| + * |Ctrl | A | S | D | F | G | H | J | K | L | ; | " | enter ||\ctrl| + * |---------------------------------------------------------------------------------------' + * | Shift | Z | X | C | V | B | N | M | < | > | ? | Shift | + * `---------------------------------------------------------------------------------' + * | Alt | Space | Caps | + * `------------------------------------------------------------------' + */ + [_BASE] = LAYOUT( + KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, KC_PSCR, KC_SLCK, KC_INS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + 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_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_PGDN, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, RCTL_T(KC_BSLS), + 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_LGUI, KC_SPC, KC_RALT), +/* + * + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. |pgup| | + * | | | | | | | | |sect| | |reset|pause| |home|pgdn| end | + * |---------------------------------------------------------------------------------------| + * |Esc| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | del | | + * |---------------------------------------------------------------------------------------| + * | | mlb | mup | mrb | ms+ | | | | up | | | | | | gui | + * |---------------------------------------------------------------------------------------| + * | | ml | mdn | mr | ms- | | | left| down|right| | | | | + * |---------------------------------------------------------------------------------------' + * | | | | | | | | | | | | | + * `---------------------------------------------------------------------------------' + * | | | | + * `------------------------------------------------------------------' + */ + [_FN1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, + _______, 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_DEL, KC_HOME, + _______, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ) +}; + +/* macros template (example) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/\n"); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +*/ + diff --git a/keyboards/handwired/videowriter/keymaps/default/readme.md b/keyboards/handwired/videowriter/keymaps/default/readme.md new file mode 100644 index 0000000000..05b0f039f9 --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for videowriter diff --git a/keyboards/handwired/videowriter/keymaps/oleg/config.h b/keyboards/handwired/videowriter/keymaps/oleg/config.h new file mode 100644 index 0000000000..3f2896a669 --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/oleg/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 DmNosachev + * + * 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 + +// Have't added any diodes in this particular convertion project +#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/videowriter/keymaps/oleg/keymap.c b/keyboards/handwired/videowriter/keymaps/oleg/keymap.c new file mode 100644 index 0000000000..76587f6f73 --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/oleg/keymap.c @@ -0,0 +1,108 @@ +/* Copyright 2019 DmNosachev + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1 +}; + +// Example of custom keycodes used by macros in process_record_user +/* +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. | up | | + * | |vol- |vol+| mute| | prev| play| stop| next| |prsc|scrlk|ins| |left|down|right| + * |---------------------------------------------------------------------------------------| + * | ~`| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSp| fn1 | + * |---------------------------------------------------------------------------------------| + * |Tab/fn1| Q | W | E | R | T | Y | U | I | O | P | [ | ] | | menu| + * |---------------------------------------------------------------------------------------| + * |Ctrl | A | S | D | F | G | H | J | K | L | ; | " | enter ||\ctrl| + * |---------------------------------------------------------------------------------------' + * | Shift | Z | X | C | V | B | N | M | < | > | ? | Shift | + * `---------------------------------------------------------------------------------' + * | Alt | Space | Caps | + * `------------------------------------------------------------------' + */ + + [_BASE] = LAYOUT( + KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, KC_PSCR, KC_SLCK, KC_INS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + 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, MO(_FN1), + LT(_FN1, 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_APP, + 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, RCTL_T(KC_BSLS), + 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_LALT, KC_SPC, KC_CAPS + ), + +/* + * sect = section sign, Unicode 0x00A7 + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. |pgup| | + * | | | | | | | | |sect| | |reset|pause| |home|pgdn| end | + * |---------------------------------------------------------------------------------------| + * |Esc| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | del | | + * |---------------------------------------------------------------------------------------| + * | | mlb | mup | mrb | ms+ | | | | up | | | | | | gui | + * |---------------------------------------------------------------------------------------| + * | | ml | mdn | mr | ms- | | | left| down|right| | | | | + * |---------------------------------------------------------------------------------------' + * | | | | | | | | | | | | | + * `---------------------------------------------------------------------------------' + * | | | | + * `------------------------------------------------------------------' + */ + + [_FN1] = LAYOUT( + _______, _______, _______, _______, _______, _______, UC(0x00A7), _______, RESET, KC_PAUS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + _______, 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_DEL, _______, + _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U ,_______, _______, _______, KC_UP, _______, _______, _______, _______, KC_RGUI, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ) +}; + +/* macros template (example) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case USECT: + if (record->event.pressed) { + // when keycode USECT is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode USECT is released + } + break; + } + return true; +} +*/ + + +void matrix_init_user(void) { + set_unicode_input_mode(UC_WIN); +} + diff --git a/keyboards/handwired/videowriter/keymaps/oleg/rules.mk b/keyboards/handwired/videowriter/keymaps/oleg/rules.mk new file mode 100644 index 0000000000..0065be986b --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/oleg/rules.mk @@ -0,0 +1,4 @@ +# this particular convertion project uses Pro Micro with DFU bootloader instead of Caterina +BOOTLOADER = lufa-dfu + +UNICODE_ENABLE = yes diff --git a/keyboards/handwired/videowriter/rules.mk b/keyboards/handwired/videowriter/rules.mk new file mode 100644 index 0000000000..7b326cc319 --- /dev/null +++ b/keyboards/handwired/videowriter/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/videowriter/videowriter.c b/keyboards/handwired/videowriter/videowriter.c new file mode 100644 index 0000000000..5f0f3d7122 --- /dev/null +++ b/keyboards/handwired/videowriter/videowriter.c @@ -0,0 +1,17 @@ +/* Copyright 2019 DmNosachev + * + * 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 "videowriter.h" diff --git a/keyboards/handwired/videowriter/videowriter.h b/keyboards/handwired/videowriter/videowriter.h new file mode 100644 index 0000000000..f06a5d50aa --- /dev/null +++ b/keyboards/handwired/videowriter/videowriter.h @@ -0,0 +1,59 @@ +/* Copyright 2019 DmNosachev + * + * 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" + +#define XXX KC_NO + +/* + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. | up | | + * | |menu|print|spell| |page|center|split|find | |copy|move|goto| |left|down|right| + * |---------------------------------------------------------------------------------------| + * |del| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSp| do | + * |---------------------------------------------------------------------------------------| + * |Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | help| + * |-----------------------------------------------------------------------------' |-----| + * |Caps | A | S | D | F | G | H | J | K | L | ; | " | return | undo| + * |---------------------------------------------------------------------------------------| + * | Shift | Z | X | C | V | B | N | M | < | > | ? | Shift | | + * '---------------------------------------------------------------------------------------' + * | style| Space | insert| + * '------------------------------------------------------------------' + */ + +#define LAYOUT( \ + K17, K16, K15, K14, K13, K12, K11, K10, K27, K26, K80, K97, K81, K96, \ + K25, K24, K23, K22, K21, K20, K37, K36, K35, K34, K33, K32, K31, K30, K95, \ + K47, K46, K45, K44, K43, K42, K41, K40, K57, K56, K55, K54, K53, K94, \ + K07, K51, K50, K67, K66, K65, K64, K63, K62, K61, K60, K77, K52, K93, \ + K06, K76, K75, K74, K73, K72, K71, K70, K87, K86, K85, K92, \ + K84, K83, K82 \ +) \ +{ \ + { XXX, XXX, XXX, XXX, XXX, XXX, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { XXX, XXX, K92, K93, K94, K95, K96, K97 } \ +}