diff options
| author | iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> | 2019-04-15 06:58:56 +0300 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-04-14 20:58:56 -0700 |
| commit | 49746830402cc0e1c0227c6c3c06ebc22fcd016c (patch) | |
| tree | f52f7c8afe9b922b67ae354c1d08504cd2228d71 | |
| parent | 5fcd744ddba591829a129560992b2e43fb615d4d (diff) | |
| download | qmk_firmware-49746830402cc0e1c0227c6c3c06ebc22fcd016c.tar.gz qmk_firmware-49746830402cc0e1c0227c6c3c06ebc22fcd016c.zip | |
[Keyboard] IBM Model M (ANSI/ISO) Teensy 2.0++ conversion (#5560)
* Added initial modelm101 config
* Update keyboards/modelm101/keymaps/default/keymap.c
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Update keyboards/modelm101/keymaps/iw0rm3r/keymap.c
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Update keyboards/modelm101/readme.md
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Added wiring notes to clarify use of the config
* Small fix
* Small fix
* Moved modelm101 to converter directory
* Added info.json file for QMK configurator
* Corrected path
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Update keyboards/converter/modelm101/readme.md
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Update keyboards/converter/modelm101/modelm101.c
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Update keyboards/converter/modelm101/modelm101.c
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Update keyboards/converter/modelm101/modelm101.c
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Update keyboards/converter/modelm101/modelm101.c
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Update keyboards/converter/modelm101/modelm101.c
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Update keyboards/converter/modelm101/modelm101.c
Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com>
* Replaced DDR and PORT with QMK functions
| -rw-r--r-- | keyboards/converter/modelm101/config.h | 123 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/info.json | 12 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/keymaps/default/config.h | 19 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/keymaps/default/keymap.c | 43 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/keymaps/iw0rm3r/config.h | 19 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c | 43 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md | 5 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/modelm101.c | 67 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/modelm101.h | 45 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/readme.md | 42 | ||||
| -rw-r--r-- | keyboards/converter/modelm101/rules.mk | 81 |
12 files changed, 500 insertions, 0 deletions
diff --git a/keyboards/converter/modelm101/config.h b/keyboards/converter/modelm101/config.h new file mode 100644 index 000000000..97b78614c --- /dev/null +++ b/keyboards/converter/modelm101/config.h | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2019 iw0rm3r | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xFEED | ||
| 24 | #define PRODUCT_ID 0x0000 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER iw0rm3r | ||
| 27 | #define PRODUCT IBM Model M 101/102 | ||
| 28 | #define DESCRIPTION Controlled by AVR chip | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 8 | ||
| 32 | #define MATRIX_COLS 16 | ||
| 33 | |||
| 34 | /* | ||
| 35 | * Keyboard Matrix Assignments | ||
| 36 | * | ||
| 37 | * Change this to how you wired your keyboard | ||
| 38 | * COLS: AVR pins used for columns, left to right | ||
| 39 | * ROWS: AVR pins used for rows, top to bottom | ||
| 40 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 41 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 42 | * | ||
| 43 | */ | ||
| 44 | #define MATRIX_ROW_PINS { F7, F6, F5, F4, F3, F2, F1, F0 } | ||
| 45 | #define MATRIX_COL_PINS { C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2 } | ||
| 46 | #define UNUSED_PINS | ||
| 47 | |||
| 48 | /* COL2ROW, ROW2COL*/ | ||
| 49 | #define DIODE_DIRECTION ROW2COL | ||
| 50 | |||
| 51 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */ | ||
| 52 | #define DEBOUNCING_DELAY 5 | ||
| 53 | |||
| 54 | /* | ||
| 55 | * Magic Key Options | ||
| 56 | * | ||
| 57 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
| 58 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 59 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 60 | * | ||
| 61 | * The options below allow the magic key functionality to be changed. This is | ||
| 62 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 63 | * | ||
| 64 | */ | ||
| 65 | |||
| 66 | /* key combination for magic key command */ | ||
| 67 | /* defined by default; to change, uncomment and set to the combination you want */ | ||
| 68 | // #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) | ||
| 69 | |||
| 70 | /* control how magic key switches layers */ | ||
| 71 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | ||
| 72 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | ||
| 73 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | ||
| 74 | |||
| 75 | /* override magic key keymap */ | ||
| 76 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | ||
| 77 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | ||
| 78 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | ||
| 79 | //#define MAGIC_KEY_HELP H | ||
| 80 | //#define MAGIC_KEY_HELP_ALT SLASH | ||
| 81 | //#define MAGIC_KEY_DEBUG D | ||
| 82 | //#define MAGIC_KEY_DEBUG_MATRIX X | ||
| 83 | //#define MAGIC_KEY_DEBUG_KBD K | ||
| 84 | //#define MAGIC_KEY_DEBUG_MOUSE M | ||
| 85 | //#define MAGIC_KEY_VERSION V | ||
| 86 | //#define MAGIC_KEY_STATUS S | ||
| 87 | //#define MAGIC_KEY_CONSOLE C | ||
| 88 | //#define MAGIC_KEY_LAYER0 0 | ||
| 89 | //#define MAGIC_KEY_LAYER0_ALT GRAVE | ||
| 90 | //#define MAGIC_KEY_LAYER1 1 | ||
| 91 | //#define MAGIC_KEY_LAYER2 2 | ||
| 92 | //#define MAGIC_KEY_LAYER3 3 | ||
| 93 | //#define MAGIC_KEY_LAYER4 4 | ||
| 94 | //#define MAGIC_KEY_LAYER5 5 | ||
| 95 | //#define MAGIC_KEY_LAYER6 6 | ||
| 96 | //#define MAGIC_KEY_LAYER7 7 | ||
| 97 | //#define MAGIC_KEY_LAYER8 8 | ||
| 98 | //#define MAGIC_KEY_LAYER9 9 | ||
| 99 | //#define MAGIC_KEY_BOOTLOADER B | ||
| 100 | //#define MAGIC_KEY_BOOTLOADER_ALT ESC | ||
| 101 | //#define MAGIC_KEY_LOCK CAPS | ||
| 102 | //#define MAGIC_KEY_EEPROM E | ||
| 103 | //#define MAGIC_KEY_EEPROM_CLEAR BSPACE | ||
| 104 | //#define MAGIC_KEY_NKRO N | ||
| 105 | //#define MAGIC_KEY_SLEEP_LED Z | ||
| 106 | |||
| 107 | /* | ||
| 108 | * Feature disable options | ||
| 109 | * These options are also useful to firmware size reduction. | ||
| 110 | */ | ||
| 111 | |||
| 112 | /* disable debug print */ | ||
| 113 | //#define NO_DEBUG | ||
| 114 | |||
| 115 | /* disable print */ | ||
| 116 | //#define NO_PRINT | ||
| 117 | |||
| 118 | /* disable action features */ | ||
| 119 | //#define NO_ACTION_LAYER | ||
| 120 | //#define NO_ACTION_TAPPING | ||
| 121 | //#define NO_ACTION_ONESHOT | ||
| 122 | //#define NO_ACTION_MACRO | ||
| 123 | //#define NO_ACTION_FUNCTION \ No newline at end of file | ||
diff --git a/keyboards/converter/modelm101/info.json b/keyboards/converter/modelm101/info.json new file mode 100644 index 000000000..868cd89b1 --- /dev/null +++ b/keyboards/converter/modelm101/info.json | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "IBM Model M 101 ANSI/102 ISO", | ||
| 3 | "url": "https://github.com/iw0rm3r/qmk_firmware/tree/modelm101/keyboards/converter/modelm101", | ||
| 4 | "maintainer": "iw0rm3r", | ||
| 5 | "width": 22.5, | ||
| 6 | "height": 6.5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.5}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] | ||
| 10 | } | ||
| 11 | } | ||
| 12 | } \ No newline at end of file | ||
diff --git a/keyboards/converter/modelm101/keymaps/default/config.h b/keyboards/converter/modelm101/keymaps/default/config.h new file mode 100644 index 000000000..779e5a858 --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/default/config.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2019 iw0rm3r | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | // place overrides here | ||
diff --git a/keyboards/converter/modelm101/keymaps/default/keymap.c b/keyboards/converter/modelm101/keymaps/default/keymap.c new file mode 100644 index 000000000..4a8614a3f --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/default/keymap.c | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* Copyright 2019 iw0rm3r | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | [0] = LAYOUT( /* Base layer */ | ||
| 20 | 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, | ||
| 21 | 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 22 | 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_P7, KC_P8, KC_P9, KC_PPLS, | ||
| 23 | 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_P4, KC_P5, KC_P6, | ||
| 24 | 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_P1, KC_P2, KC_P3, KC_LGUI, | ||
| 25 | KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT | ||
| 26 | ), | ||
| 27 | }; | ||
| 28 | |||
| 29 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 30 | return true; | ||
| 31 | } | ||
| 32 | |||
| 33 | void matrix_init_user(void) { | ||
| 34 | |||
| 35 | } | ||
| 36 | |||
| 37 | void matrix_scan_user(void) { | ||
| 38 | |||
| 39 | } | ||
| 40 | |||
| 41 | void led_set_user(uint8_t usb_led) { | ||
| 42 | |||
| 43 | } | ||
diff --git a/keyboards/converter/modelm101/keymaps/default/readme.md b/keyboards/converter/modelm101/keymaps/default/readme.md new file mode 100644 index 000000000..fb91a8ebe --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for modelm101 \ No newline at end of file | |||
diff --git a/keyboards/converter/modelm101/keymaps/iw0rm3r/config.h b/keyboards/converter/modelm101/keymaps/iw0rm3r/config.h new file mode 100644 index 000000000..779e5a858 --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/iw0rm3r/config.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2019 iw0rm3r | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | // place overrides here | ||
diff --git a/keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c b/keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c new file mode 100644 index 000000000..26ced801e --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* Copyright 2019 iw0rm3r | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | [0] = LAYOUT( /* Base layer */ | ||
| 20 | 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, | ||
| 21 | 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 22 | 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_P7, KC_P8, KC_P9, KC_PPLS, | ||
| 23 | KC_LGUI, 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_P4, KC_P5, KC_P6, | ||
| 24 | 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_P1, KC_P2, KC_P3, KC_CAPS, | ||
| 25 | KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_APP, KC_PDOT | ||
| 26 | ), | ||
| 27 | }; | ||
| 28 | |||
| 29 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 30 | return true; | ||
| 31 | } | ||
| 32 | |||
| 33 | void matrix_init_user(void) { | ||
| 34 | |||
| 35 | } | ||
| 36 | |||
| 37 | void matrix_scan_user(void) { | ||
| 38 | |||
| 39 | } | ||
| 40 | |||
| 41 | void led_set_user(uint8_t usb_led) { | ||
| 42 | |||
| 43 | } | ||
diff --git a/keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md b/keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md new file mode 100644 index 000000000..17b0f40da --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # This is my personal keymap for modelm101 | ||
| 2 | |||
| 3 | Caps Lock is mapped as LGUI (Windows key). | ||
| 4 | Num Enter is mapped as Caps Lock. | ||
| 5 | Num0 is mapped as App key (context menu). \ No newline at end of file | ||
diff --git a/keyboards/converter/modelm101/modelm101.c b/keyboards/converter/modelm101/modelm101.c new file mode 100644 index 000000000..c2204bea6 --- /dev/null +++ b/keyboards/converter/modelm101/modelm101.c | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | /* Copyright 2019 iw0rm3r | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "modelm101.h" | ||
| 17 | |||
| 18 | void keyboard_pre_init_kb(void) { | ||
| 19 | /* Setting status LEDs pins to output and +5V (off) */ | ||
| 20 | setPinOutput(B4); | ||
| 21 | setPinOutput(B5); | ||
| 22 | setPinOutput(B6); | ||
| 23 | writePinHigh(B4); | ||
| 24 | writePinHigh(B5); | ||
| 25 | writePinHigh(B6); | ||
| 26 | } | ||
| 27 | |||
| 28 | void matrix_init_kb(void) { | ||
| 29 | /* put your keyboard start-up code here | ||
| 30 | * runs once when the firmware starts up */ | ||
| 31 | |||
| 32 | matrix_init_user(); | ||
| 33 | } | ||
| 34 | |||
| 35 | void matrix_scan_kb(void) { | ||
| 36 | /* put your looping keyboard code here | ||
| 37 | * runs every cycle (a lot) */ | ||
| 38 | |||
| 39 | matrix_scan_user(); | ||
| 40 | } | ||
| 41 | |||
| 42 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 43 | /* put your per-action keyboard code here | ||
| 44 | * runs for every action, just before processing by the firmware */ | ||
| 45 | |||
| 46 | return process_record_user(keycode, record); | ||
| 47 | } | ||
| 48 | |||
| 49 | void led_set_kb(uint8_t usb_led) { | ||
| 50 | if (usb_led & (1<<USB_LED_NUM_LOCK)) { | ||
| 51 | writePinLow(B4); | ||
| 52 | } else { | ||
| 53 | writePinHigh(B4); | ||
| 54 | } | ||
| 55 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
| 56 | writePinLow(B6); | ||
| 57 | } else { | ||
| 58 | writePinHigh(B6); | ||
| 59 | } | ||
| 60 | if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { | ||
| 61 | writePinLow(B5); | ||
| 62 | } else { | ||
| 63 | writePinHigh(B5); | ||
| 64 | } | ||
| 65 | |||
| 66 | led_set_user(usb_led); | ||
| 67 | } | ||
diff --git a/keyboards/converter/modelm101/modelm101.h b/keyboards/converter/modelm101/modelm101.h new file mode 100644 index 000000000..1a2cdc8b6 --- /dev/null +++ b/keyboards/converter/modelm101/modelm101.h | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | /* Copyright 2019 iw0rm3r | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | /* This a shortcut to help you visually see your layout. | ||
| 21 | * The first section contains "names" for physical keys of the keyboard | ||
| 22 | * and defines their position on the board. | ||
| 23 | * The second section defines position of the keys on the switch matrix | ||
| 24 | * (where COLUMNS and ROWS crosses). */ | ||
| 25 | |||
| 26 | #define LAYOUT( \ | ||
| 27 | K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ | ||
| 28 | \ | ||
| 29 | K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \ | ||
| 30 | K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \ | ||
| 31 | K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, \ | ||
| 32 | K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ | ||
| 33 | K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \ | ||
| 34 | ) \ | ||
| 35 | { \ | ||
| 36 | /* 00 */ { KC_NO, KC_NO, K5A, K1B, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, K0I, K0J, K1N, K0B }, \ | ||
| 37 | /* 01 */ { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, K2O, K2P, K2Q, KC_NO, KC_NO }, \ | ||
| 38 | /* 02 */ { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \ | ||
| 39 | /* 03 */ { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \ | ||
| 40 | /* 04 */ { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, K3R, K3S, K3T, K3U, K5O }, \ | ||
| 41 | /* 05 */ { KC_NO, KC_NO, K2B, K2C, K2D, K2E, K3N, K2H, K2I, K2J, K2K, K1O, K1P, K1Q, K1R, KC_NO }, \ | ||
| 42 | /* 06 */ { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, K2M, K4R, K4S, K4T, K5P, KC_NO }, \ | ||
| 43 | /* 07 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, K4U, K0F, K0D }, \ | ||
| 44 | } | ||
| 45 | /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ \ No newline at end of file | ||
diff --git a/keyboards/converter/modelm101/readme.md b/keyboards/converter/modelm101/readme.md new file mode 100644 index 000000000..5355c8007 --- /dev/null +++ b/keyboards/converter/modelm101/readme.md | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | # modelm101 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | This is a configuration for the QMK firmware for reversible conversion of IBM's Model M keyboards (common 101-key ANSI and 102-key ISO models) from stock, power-hungry controller, to a modern one, running the USB bus. | ||
| 6 | Configuration is build for the Atmel AT90USB1286 controller, which you can easily use on the Teensy 2.0++ board (produced by PJRC). | ||
| 7 | Project is heavely based on 2 other projects: | ||
| 8 | 1. Teensy 2.0++-based custom Model M controller running TMK firmware ('modelm" by [lmorchard](https://blog.lmorchard.com/2016/02/21/modelm-controller/)); - had a few issues. | ||
| 9 | 2. Teensy 2.0++-based custom Model M 122-key controller running QMK firmware ("ibm122m" by [lukexorz](https://github.com/lukexorz)); - had wrong layout for 101/102-key boards and no status LED support. | ||
| 10 | |||
| 11 | For this conversion you will need: | ||
| 12 | 1. Teensy 2.0++ dev board itself (can be used a different dev board, but it will require some changes in configuration); | ||
| 13 | 2. Ribbon connectors to connect the membrane to a dev board. Depending on your Model M variation, you will need 1 Trio-mate 16pin connector (6-520315-6 or 6-520415-6) and 1 Trio-mate 8pin connector (5-120628-8 or 5-520314-8), or 2 Trio-mate 16pin connectors; | ||
| 14 | 3. Full-sized breadboard (without power rails; half-size should do, but full-sized one looks more native) or a PCB to wire everything up; | ||
| 15 | 4. A bunch of jumper wires; | ||
| 16 | 5. mini-USB male cable with any USB socket you want to use to connect Teensy inside the keyboard to your PC (I use short mini-USB male to mini-USB female cable); | ||
| 17 | 6. (optional) Resistors for connecting status LEDs if your LED PCB doesn't have any; | ||
| 18 | 7. (optional) Double-sided tape to fix USB socket on or inside the keyboard case. | ||
| 19 | |||
| 20 | Pins of the Teensy board you should use by default: | ||
| 21 | ``` | ||
| 22 | Columns: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ||
| 23 | Pins: C7 C6 C5 C4 C3 C2 C1 C0 E1 E0 D7 D6 D5 D4 D3 D2 | ||
| 24 | -------------------------------------------------------- | ||
| 25 | Rows: 1 2 3 4 5 6 7 8 | ||
| 26 | Pins: F7 F6 F5 F4 F3 F2 F1 F0 | ||
| 27 | -------------------------------------------------------- | ||
| 28 | Status LEDs: CapsLock +5V ScrollLock NumLock | ||
| 29 | Pins: B6 5V B5 B4 | ||
| 30 | ``` | ||
| 31 | |||
| 32 | Please note that some versions of Model M have LED connected with a ribbon cable, and not with separate wires. | ||
| 33 | |||
| 34 | Keyboard Maintainer: [iw0rm3r](https://github.com/iw0rm3r) | ||
| 35 | Hardware Supported: Teensy 2.0++ board by PJRC | ||
| 36 | Hardware Availability: https://www.pjrc.com/store/teensypp.html | ||
| 37 | |||
| 38 | Make example for this keyboard (after setting up your build environment): | ||
| 39 | |||
| 40 | make converter/modelm101:default:teensy | ||
| 41 | |||
| 42 | 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/converter/modelm101/rules.mk b/keyboards/converter/modelm101/rules.mk new file mode 100644 index 000000000..620526971 --- /dev/null +++ b/keyboards/converter/modelm101/rules.mk | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = at90usb1286 | ||
| 3 | #MCU = atmega32u4 | ||
| 4 | |||
| 5 | # Processor frequency. | ||
| 6 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 7 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 8 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 9 | # automatically to create a 32-bit value in your source code. | ||
| 10 | # | ||
| 11 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 12 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 13 | # does not *change* the processor frequency - it should merely be updated to | ||
| 14 | # reflect the processor speed set externally so that the code can use accurate | ||
| 15 | # software delays. | ||
| 16 | F_CPU = 16000000 | ||
| 17 | |||
| 18 | |||
| 19 | # | ||
| 20 | # LUFA specific | ||
| 21 | # | ||
| 22 | # Target architecture (see library "Board Types" documentation). | ||
| 23 | ARCH = AVR8 | ||
| 24 | |||
| 25 | # Input clock frequency. | ||
| 26 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 27 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 28 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 29 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 30 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 31 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 32 | # source code. | ||
| 33 | # | ||
| 34 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 35 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 36 | F_USB = $(F_CPU) | ||
| 37 | |||
| 38 | # Interrupt driven control endpoint task(+60) | ||
| 39 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 40 | |||
| 41 | |||
| 42 | # Bootloader selection | ||
| 43 | # Teensy halfkay | ||
| 44 | # Pro Micro caterina | ||
| 45 | # Atmel DFU atmel-dfu | ||
| 46 | # LUFA DFU lufa-dfu | ||
| 47 | # QMK DFU qmk-dfu | ||
| 48 | # atmega32a bootloadHID | ||
| 49 | BOOTLOADER = halfkay | ||
| 50 | |||
| 51 | |||
| 52 | # If you don't know the bootloader type, then you can specify the | ||
| 53 | # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | ||
| 54 | # Teensy halfKay 512 | ||
| 55 | # Teensy++ halfKay 1024 | ||
| 56 | # Atmel DFU loader 4096 | ||
| 57 | # LUFA bootloader 4096 | ||
| 58 | # USBaspLoader 2048 | ||
| 59 | #OPT_DEFS += -DBOOTLOADER_SIZE=1024 | ||
| 60 | |||
| 61 | |||
| 62 | # Build Options | ||
| 63 | # change yes to no to disable | ||
| 64 | # | ||
| 65 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 66 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 67 | EXTRAKEY_ENABLE = no # Audio control and System control(+450) | ||
| 68 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 69 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 70 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 71 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 72 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 73 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 74 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
| 75 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 76 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
| 77 | UNICODE_ENABLE = no # Unicode | ||
| 78 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 79 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 80 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
| 81 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | ||
