diff options
87 files changed, 3512 insertions, 611 deletions
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index a000241f8b..cf54dddfb7 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -228,6 +228,8 @@ bool led_update_user(led_t led_state) { } ``` +Note: For split keyboards with two controllers, both sides need to be flashed when updating the contents of rgblight_layers. + ## Functions If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include: diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md index 8091781e8a..6f4c14f4c7 100644 --- a/docs/ja/_summary.md +++ b/docs/ja/_summary.md @@ -78,7 +78,7 @@ * [キーロック](ja/feature_key_lock.md) * [レイアウト](ja/feature_layouts.md) * [リーダー キー](ja/feature_leader_key.md) - * [LED マトリクス](ja/feature_led_matrix.md) + * [LED マトリックス](ja/feature_led_matrix.md) * [マクロ](ja/feature_macros.md) * [マウスキー](ja/feature_mouse_keys.md) * [OLED ドライバ](ja/feature_oled_driver.md) @@ -86,7 +86,7 @@ * [ポインティング デバイス](ja/feature_pointing_device.md) * [PS/2 マウス](ja/feature_ps2_mouse.md) * [RGB ライト](ja/feature_rgblight.md) - * [RGB マトリクス](ja/feature_rgb_matrix.md) + * [RGB マトリックス](ja/feature_rgb_matrix.md) * [Space Cadet](ja/feature_space_cadet.md) * [分割キーボード](ja/feature_split_keyboard.md) * [Stenography](ja/feature_stenography.md) diff --git a/docs/ja/custom_matrix.md b/docs/ja/custom_matrix.md new file mode 100644 index 0000000000..f333711e63 --- /dev/null +++ b/docs/ja/custom_matrix.md @@ -0,0 +1,114 @@ +# カスタムマトリックス + +<!--- + grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh + original document: 0.8.46:docs/custom_matrix.md + git diff 0.8.46 HEAD -- docs/custom_matrix.md | cat +--> + +QMKは、デフォルトのマトリックススキャンルーチンを独自のコードで部分的に入れ替えたり全部入れ替えたりしたりするメカニズムを提供します。 + +この機能を使用する理由は次のとおりです: + +* キーボードのスイッチと MCU ピンの間に追加のハードウェアがある場合 + * I/O マルチプレクサ + * ラインデコーダー +* 一般的ではないキースイッチマトリックス + * `COL2ROW` と `ROW2COL` の同時使用 + +## 前提条件 + +カスタムマトリックスの実装には、通常、追加のソースファイルのコンパイルが含まれます。 +一貫性を保つために、このソースファイルのファイル名は `matrix.c` とすることをお勧めします。 + +あなたのキーボードディレクトリに新しいファイルを追加します: +```text +keyboards/<keyboard>/matrix.c +``` + +そして、新しいファイルのコンパイルを指定するため、以下を `rules.mk` に追加します +```make +SRC += matrix.c +``` + +## マトリックスコードの部分置き換え + +カスタムマトリックスを実装する際、定型コードを書かなくてすむように、さまざまなスキャン関数のデフォルト実装を提供しています。 + +設定するには、以下を `rules.mk` に追加します: +```make +CUSTOM_MATRIX = lite +``` + +そして、キーボードディレクトリの `matrix.c` ファイルに次の関数を実装します。 + +```c +void matrix_init_custom(void) { + // TODO: ここでハードウェアの初期化をする +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool matrix_has_changed = false; + + // TODO: ここで、マトリックススキャンを行なう + + return matrix_has_changed; +} +``` + +## マトリックスコードの全面置き換え + +スキャンルーチンをさらに変更する必要がある場合は、完全なスキャンルーチンを実装することを選択できます。 + +設定するには、以下を `rules.mk` に追加します: +```make +CUSTOM_MATRIX = yes +``` + +そして、キーボードディレクトリの `matrix.c` ファイルに次の関数を実装します。 + +```c +matrix_row_t matrix_get_row(uint8_t row) { + // TODO: 要求された行データを返します +} + +void matrix_print(void) { + // TODO: printf() を使って現在のマトリックスの状態をコンソールにダンプします +} + +void matrix_init(void) { + // TODO: ここでハードウェアとグローバルマトリックスの状態を初期化します + + // ハードウェアによるデバウンスがない場合 - 設定されているデバウンスルーチンを初期化します + debounce_init(MATRIX_ROWS); + + // 正しいキーボード動作のためにこれを呼び出す*必要があります* + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + bool matrix_has_changed = false; + + // TODO: ここにマトリックススキャンルーチンを追加します + + // ハードウェアによるデバウンスがない場合 - 設定されているデバウンスルーチンを使用します + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + // 正しいキーボード動作のためにこれを呼び出す*必要があります* + matrix_scan_quantum(); + + return matrix_has_changed; +} +``` + +また、次のコールバックのデフォルトも提供します。 + +```c +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__((weak)) void matrix_init_user(void) {} + +__attribute__((weak)) void matrix_scan_user(void) {} +``` diff --git a/keyboards/ai03/polaris/info.json b/keyboards/ai03/polaris/info.json index 59a24e2e59..13b7e8de4c 100644 --- a/keyboards/ai03/polaris/info.json +++ b/keyboards/ai03/polaris/info.json @@ -1,9 +1,9 @@ { - "keyboard_name": "Polaris", - "url": "https://kb.ai03.me/projects/polaris.html", - "maintainer": "ai03", - "width": 15, - "height": 5, + "keyboard_name": "Polaris", + "url": "https://kb.ai03.me/projects/polaris.html", + "maintainer": "ai03", + "width": 15, + "height": 5, "layouts": { "LAYOUT_all": { "layout": [ @@ -75,6 +75,138 @@ {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} ] }, + "LAYOUT_60_ansi": { + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Delete", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Print Screen", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + }, "LAYOUT_60_tsangan_hhkb": { "layout": [ {"label":"~", "x":0, "y":0}, diff --git a/keyboards/ai03/polaris/polaris.h b/keyboards/ai03/polaris/polaris.h index 2bd65806ff..8e541b2cf4 100644 --- a/keyboards/ai03/polaris/polaris.h +++ b/keyboards/ai03/polaris/polaris.h @@ -40,6 +40,36 @@ { K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413 } \ } +#define LAYOUT_60_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K406, K410, K411, K412, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO}, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413 } \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K406, K410, K411, K412, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413 } \ +} + #define LAYOUT_60_tsangan_hhkb( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ diff --git a/keyboards/ai03/polaris/rules.mk b/keyboards/ai03/polaris/rules.mk index 150199cbe0..8f94582a86 100644 --- a/keyboards/ai03/polaris/rules.mk +++ b/keyboards/ai03/polaris/rules.mk @@ -31,4 +31,4 @@ 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 -LAYOUTS = 60_tsangan_hhkb +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_tsangan_hhkb diff --git a/keyboards/choco60/keymaps/default/keymap.c b/keyboards/choco60/keymaps/default/keymap.c index ab3f2c6a2b..c906fef779 100644 --- a/keyboards/choco60/keymaps/default/keymap.c +++ b/keyboards/choco60/keymaps/default/keymap.c @@ -25,17 +25,17 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSLASH, KC_GRAVE, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSPACE, - KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER, - KC_LSHIFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_FN, - KC_LALT, KC_LGUI, KC_SPACE, KC_SPACE, KC_SPACE, KC_RGUI, KC_RALT + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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, + 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_FN, + KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT ), [_FN] = LAYOUT( - _______, 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_INSERT, KC_DELETE, - _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCREEN, KC_SCROLLLOCK, KC_PAUSE, KC_UP, KC_RBRACKET, KC_BSPACE, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_ENTER, - RESET, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDOWN, KC_DOWN, KC_RSHIFT, KC_FN, - _______, _______, _______, _______, _______, KC_STOP, _______ + _______, 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_INS, KC_DEL, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, KC_STOP, RESET ) }; diff --git a/keyboards/flx/lodestone/config.h b/keyboards/flx/lodestone/config.h new file mode 100644 index 0000000000..b2a1022a45 --- /dev/null +++ b/keyboards/flx/lodestone/config.h @@ -0,0 +1,70 @@ +/* Copyright 2020 Shaun Mitchell (Flex) + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4658 //FX +#define PRODUCT_ID 0x4C53 //LS +#define DEVICE_VER 0x0001 +#define MANUFACTURER FLX +#define PRODUCT Lodestone +#define DESCRIPTION FLX Lodestone + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * 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 { B3, B7, F0, F1, F4 } +#define MATRIX_COL_PINS { B2, F5, F6, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 diff --git a/keyboards/flx/lodestone/info.json b/keyboards/flx/lodestone/info.json new file mode 100644 index 0000000000..52f5580b13 --- /dev/null +++ b/keyboards/flx/lodestone/info.json @@ -0,0 +1,84 @@ +{ + "keyboard_name": "lodestone", + "url": "https://prototypist.net/", + "maintainer": "Flexerm", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"K00 (B3,B2)", "x":0, "y":0}, + {"label":"K01 (B3,F5)", "x":1, "y":0}, + {"label":"K02 (B3,F6)", "x":2, "y":0}, + {"label":"K03 (B3,D0)", "x":3, "y":0}, + {"label":"K04 (B3,D1)", "x":4, "y":0}, + {"label":"K05 (B3,D2)", "x":5, "y":0}, + {"label":"K06 (B3,D3)", "x":6, "y":0}, + {"label":"K07 (B3,D5)", "x":7, "y":0}, + {"label":"K08 (B3,D4)", "x":8, "y":0}, + {"label":"K09 (B3,D6)", "x":9, "y":0}, + {"label":"K0A (B3,D7)", "x":10, "y":0}, + {"label":"K0B (B3,B4)", "x":11, "y":0}, + {"label":"K0C (B3,B5)", "x":12, "y":0}, + {"label":"K0D (B3,B6)", "x":13, "y":0}, + {"label":"K0E (B3,C6)", "x":14, "y":0}, + {"label":"K0F (B3,C7)", "x":15, "y":0}, + {"label":"K10 (B7,B2)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B7,F5)", "x":1.5, "y":1}, + {"label":"K12 (B7,F6)", "x":2.5, "y":1}, + {"label":"K13 (B7,D0)", "x":3.5, "y":1}, + {"label":"K14 (B7,D1)", "x":4.5, "y":1}, + {"label":"K15 (B7,D2)", "x":5.5, "y":1}, + {"label":"K16 (B7,D3)", "x":6.5, "y":1}, + {"label":"K17 (B7,D5)", "x":7.5, "y":1}, + {"label":"K18 (B7,D4)", "x":8.5, "y":1}, + {"label":"K19 (B7,D6)", "x":9.5, "y":1}, + {"label":"K1A (B7,D7)", "x":10.5, "y":1}, + {"label":"K1B (B7,B4)", "x":11.5, "y":1}, + {"label":"K1C (B7,B5)", "x":12.5, "y":1}, + {"label":"K1D (B7,B6)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (B7,C7)", "x":15, "y":1}, + {"label":"K20 (F0,B2)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (F0,F5)", "x":1.75, "y":2}, + {"label":"K22 (F0,F6)", "x":2.75, "y":2}, + {"label":"K23 (F0,D0)", "x":3.75, "y":2}, + {"label":"K24 (F0,D1)", "x":4.75, "y":2}, + {"label":"K25 (F0,D2)", "x":5.75, "y":2}, + {"label":"K26 (F0,D3)", "x":6.75, "y":2}, + {"label":"K27 (F0,D5)", "x":7.75, "y":2}, + {"label":"K28 (F0,D4)", "x":8.75, "y":2}, + {"label":"K29 (F0,D6)", "x":9.75, "y":2}, + {"label":"K2A (F0,D7)", "x":10.75, "y":2}, + {"label":"K2B (F0,B4)", "x":11.75, "y":2}, + {"label":"K2C (F0,B5)", "x":12.75, "y":2}, + {"label":"K2D (F0,B6)", "x":13.75, "y":2, "w":1.25}, + {"label":"K2F (F0,C7)", "x":15, "y":2}, + {"label":"K30 (F1,B2)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (F1,F5)", "x":1.25, "y":3}, + {"label":"K32 (F1,F6)", "x":2.25, "y":3}, + {"label":"K33 (F1,D0)", "x":3.25, "y":3}, + {"label":"K34 (F1,D1)", "x":4.25, "y":3}, + {"label":"K35 (F1,D2)", "x":5.25, "y":3}, + {"label":"K36 (F1,D3)", "x":6.25, "y":3}, + {"label":"K37 (F1,D5)", "x":7.25, "y":3}, + {"label":"K38 (F1,D4)", "x":8.25, "y":3}, + {"label":"K39 (F1,D6)", "x":9.25, "y":3}, + {"label":"K3A (F1,D7)", "x":10.25, "y":3}, + {"label":"K3B (F1,B4)", "x":11.25, "y":3}, + {"label":"K3C (F1,B5)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3E (F1,C6)", "x":14, "y":3}, + {"label":"K3F (F1,C7)", "x":15, "y":3}, + {"label":"K40 (F4,B2)", "x":0, "y":4, "w":1.225}, + {"label":"K41 (F4,F5)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (F4,F6)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (F4,D3)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (F4,D7)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (F4,B4)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4D (F4,B6)", "x":13, "y":4}, + {"label":"K4E (F4,C6)", "x":14, "y":4}, + {"label":"K4F (F4,C7)", "x":15, "y":4} + ] + } + } + } + diff --git a/keyboards/flx/lodestone/keymaps/default/keymap.c b/keyboards/flx/lodestone/keymaps/default/keymap.c new file mode 100644 index 0000000000..7ddaceaa7d --- /dev/null +++ b/keyboards/flx/lodestone/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME, + 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_PGUP, + 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_PGDN, + KC_LSFT, KC_BSLS, 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, 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_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/flx/lodestone/keymaps/default/readme.md b/keyboards/flx/lodestone/keymaps/default/readme.md new file mode 100644 index 0000000000..55aeb57eac --- /dev/null +++ b/keyboards/flx/lodestone/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Lodestone diff --git a/keyboards/flx/lodestone/keymaps/via/keymap.c b/keyboards/flx/lodestone/keymaps/via/keymap.c new file mode 100644 index 0000000000..669d7fc44e --- /dev/null +++ b/keyboards/flx/lodestone/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME, + 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_PGUP, + 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_PGDN, + KC_LSFT, KC_BSLS, 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, 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_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/flx/lodestone/keymaps/via/readme.md b/keyboards/flx/lodestone/keymaps/via/readme.md new file mode 100644 index 0000000000..9ee2c477bc --- /dev/null +++ b/keyboards/flx/lodestone/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for Lodestone
\ No newline at end of file diff --git a/keyboards/flx/lodestone/keymaps/via/rules.mk b/keyboards/flx/lodestone/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/flx/lodestone/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/m0lly/keymaps/default/config.h b/keyboards/flx/lodestone/lodestone.c index ee142927f3..bb0df70cc7 100644 --- a/keyboards/m0lly/keymaps/default/config.h +++ b/keyboards/flx/lodestone/lodestone.c @@ -1,4 +1,4 @@ -/* Copyright 2017 Mathias Andersson <wraul@dbox.se> +/* Copyright 2020 Shaun Mitchell (Flex) * * 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 @@ -14,11 +14,4 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#pragma once - -#define USE_I2C -#define SSD1306OLED -//#define OLED_ROTATE180 -#define SSD1306_ADDRESS 0x3C - -// place overrides here +#include "lodestone.h" diff --git a/keyboards/flx/lodestone/lodestone.h b/keyboards/flx/lodestone/lodestone.h new file mode 100644 index 0000000000..4e23235568 --- /dev/null +++ b/keyboards/flx/lodestone/lodestone.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Shaun Mitchell (Flex) + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +// standard 65% layout ANSI + ISO + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, \ + K40, K41, K42, K46, K4A, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, ___, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, ___, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, K3E, K3F }, \ + { K40, K41, K42, ___, ___, ___, K46, ___, ___, ___, K4A, K4B, ___, K4D, K4E, K4F }, \ +} diff --git a/keyboards/flx/lodestone/readme.md b/keyboards/flx/lodestone/readme.md new file mode 100644 index 0000000000..e52d8d0c69 --- /dev/null +++ b/keyboards/flx/lodestone/readme.md @@ -0,0 +1,13 @@ +# FLX & proto[Typist] Lodestone + +Lodestone is a keyboard PCB supporting 65% layout with one bottom row blocker, designed by Flex of FLX Keyboards. [More info at proto[Typist]](https://prototypist.net/) + +* Keyboard Maintainer: [Flexerm](https://github.com/Flexerm) +* Hardware Supported: FLX - Lodestone (LS65) PCB +* Hardware Availability: [proto[Typist]](https://prototypist.net/) + +Make example for this keyboard (after setting up your build environment): + + make flx/lodestone: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/flx/lodestone/rules.mk b/keyboards/flx/lodestone/rules.mk new file mode 100644 index 0000000000..b7eb5514bb --- /dev/null +++ b/keyboards/flx/lodestone/rules.mk @@ -0,0 +1,33 @@ +# 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 = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +LTO_ENABLE = yes diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/config.h b/keyboards/handwired/onekey/keymaps/i2c_scanner/config.h new file mode 100644 index 0000000000..42ab08e36e --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/i2c_scanner/config.h @@ -0,0 +1,6 @@ +#pragma once + +// AVR: can change to other supported values +#define F_SCL 100000UL + +// TODO: add some default ARM configs for i2cv1 and i2cv2 diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c b/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c new file mode 100644 index 0000000000..262bd588f2 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c @@ -0,0 +1,66 @@ +#include QMK_KEYBOARD_H + +#include "i2c_master.h" +#include "debug.h" + +#define TIMEOUT 50 + +// TODO: remove patch +#ifdef PROTOCOL_CHIBIOS +# pragma message("ChibiOS is currently 'best effort' and might not report accurate results") + +i2c_status_t i2c_start_bodge(uint8_t address, uint16_t timeout) { + i2c_start(address); + + // except on ChibiOS where the only way is do do "something" + uint8_t data = 0; + return i2c_readReg(address, 0, &data, sizeof(data), TIMEOUT); +} + +# define i2c_start i2c_start_bodge +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT(KC_A) // +}; + +void do_scan(void) { + uint8_t nDevices = 0; + + dprintf("Scanning...\n"); + + for (uint8_t address = 1; address < 127; address++) { + // The i2c_scanner uses the return value of + // i2c_start to see if a device did acknowledge to the address. + i2c_status_t error = i2c_start(address << 1, TIMEOUT); + if (error == I2C_STATUS_SUCCESS) { + i2c_stop(); + dprintf(" I2C device found at address 0x%02X\n", address); + nDevices++; + } else { + // dprintf(" Unknown error (%u) at address 0x%02X\n", error, address); + } + } + + if (nDevices == 0) + dprintf("No I2C devices found\n"); + else + dprintf("done\n"); +} + +uint16_t scan_timer = 0; + +void matrix_scan_user(void) { + if (timer_elapsed(scan_timer) > 5000) { + do_scan(); + scan_timer = timer_read(); + } +} + +void keyboard_post_init_user(void) { + debug_enable = true; + debug_matrix = true; + + i2c_init(); + scan_timer = timer_read(); +} diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/readme.md b/keyboards/handwired/onekey/keymaps/i2c_scanner/readme.md new file mode 100644 index 0000000000..ce6357a9c2 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/i2c_scanner/readme.md @@ -0,0 +1,36 @@ +# i2c_scanner + +Aiming to provide a more qmk friendly version of <https://playground.arduino.cc/Main/I2cScanner/> + +> This very simple ~~sketch~~ keymap scans the I2C-bus for devices. If a device is found, it is reported to the ~~Arduino serial monitor~~ console. + + +## Flashing + +Pick a target that is aligned to the MCU you want to test: + +```console +make handwired/onekey/elite_c:i2c_scanner:flash # also 32u4 + dfu bootloader +make handwired/onekey/promicro:i2c_scanner:flash +make handwired/onekey/teensy_2:i2c_scanner:flash + +# ChibiOS is currently 'best effort' and might not report accurate results +make handwired/onekey/proton_c:i2c_scanner:flash +``` + +others might work with additional configuration. + +## Usage + +Output is viewable through a compatible tool <https://docs.qmk.fm/#/newbs_testing_debugging?id=debugging-tools>. + +You can change the wires, and plug-in I2C devices while the i2c_scanner is running. + +The output of the console will look like this: + +``` +Listening: +Scanning... + I2C device found at address 0x20 +done +``` diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk b/keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk new file mode 100644 index 0000000000..04498a8831 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk @@ -0,0 +1,3 @@ +CONSOLE_ENABLE = yes + +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/handwired/sick68/config.h b/keyboards/handwired/sick68/config.h new file mode 100644 index 0000000000..3d7d413fa1 --- /dev/null +++ b/keyboards/handwired/sick68/config.h @@ -0,0 +1,254 @@ +/* +Copyright 2020 umbynos + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x5F00 +#define DEVICE_VER 0x0001 +#define MANUFACTURER umbynos +#define PRODUCT sick68 +#define DESCRIPTION A 3d printed custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 \ + { D3, D2, D1, D0, D4 } +#define MATRIX_COL_PINS \ + { C6, D7, E6, B4, B5, B0, D5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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. + * + */ + +/* 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 +/* + * 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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/sick68/info.json b/keyboards/handwired/sick68/info.json new file mode 100644 index 0000000000..29faff29fa --- /dev/null +++ b/keyboards/handwired/sick68/info.json @@ -0,0 +1,86 @@ +{ + "keyboard_name": "sick68", + "url": "", + "maintainer": "umbynos", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "key_count": 68, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"~", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Page Up", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"Page Down", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4}, + {"label":"Fn", "x":11, "y":4}, + {"label":"Ctrl", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/handwired/sick68/keymaps/default/keymap.c b/keyboards/handwired/sick68/keymaps/default/keymap.c new file mode 100644 index 0000000000..f25be19076 --- /dev/null +++ b/keyboards/handwired/sick68/keymaps/default/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2020 umbynos + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BASE: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ + [_BASE] = LAYOUT_65_ansi( + KC_ESC, 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_GRV, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * | | |Up | | | | | | | | | | | |Hme | + * |----------------------------------------------------------------| + * | |<- |Dn | ->| | | | | | | | | |End | + * |----------------------------------------------------------------| + * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR | + * |----------------------------------------------------------------| + * | | | | | | | |MsL|MsD|MsR | + * `----------------------------------------------------------------' + */ + [_FN] = LAYOUT_65_ansi( + _______, 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_INS, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_BTN1, KC_MS_U, KC_BTN2, + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), +}; + + +/* +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool led_update_user(led_t led_state) { + return true; +} +*/ diff --git a/keyboards/handwired/sick68/keymaps/default/readme.md b/keyboards/handwired/sick68/keymaps/default/readme.md new file mode 100644 index 0000000000..0cc8fbefcc --- /dev/null +++ b/keyboards/handwired/sick68/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for sick68 diff --git a/keyboards/handwired/sick68/readme.md b/keyboards/handwired/sick68/readme.md new file mode 100644 index 0000000000..c37ac85c72 --- /dev/null +++ b/keyboards/handwired/sick68/readme.md @@ -0,0 +1,15 @@ +# SiCK-68 + +![sick68](https://cdn.thingiverse.com/renders/f2/af/c2/ce/e6/11b1601df06621e69068389e4fb0d943_preview_featured.JPG) + +The SiCK-68 is a custom 3D printed mechanical keyboard built from scratch without the price tag often associated with one. It uses the Tada68 layout but an arduino pro micro as microcontroller. + +* Keyboard Maintainer: [umbynos](https://github.com/umbynos) +* Hardware Supported: Arduino Pro Micro +* Hardware Availability: [files to print and documentation](https://www.thingiverse.com/thing:3478494) + +Make example for this keyboard (after setting up your build environment): + + make handwired/sick68: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/handwired/sick68/rules.mk b/keyboards/handwired/sick68/rules.mk new file mode 100644 index 0000000000..f90c4cf21e --- /dev/null +++ b/keyboards/handwired/sick68/rules.mk @@ -0,0 +1,34 @@ +# 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 + +LAYOUTS = 65_ansi diff --git a/keyboards/handwired/sick68/sick68.c b/keyboards/handwired/sick68/sick68.c new file mode 100644 index 0000000000..c1f37824ca --- /dev/null +++ b/keyboards/handwired/sick68/sick68.c @@ -0,0 +1,17 @@ +/* Copyright 2020 umbynos + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#include "sick68.h" diff --git a/keyboards/handwired/sick68/sick68.h b/keyboards/handwired/sick68/sick68.h new file mode 100644 index 0000000000..bbd8be55f7 --- /dev/null +++ b/keyboards/handwired/sick68/sick68.h @@ -0,0 +1,62 @@ +/* Copyright 2020 umbynos + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +// readability +#define XXX KC_NO + +/* TADA68 ANSI layout + * ,----------------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | + * |----------------------------------------------------------------| + * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | 1e | + * |----------------------------------------------------------------| + * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d | 2e | + * |----------------------------------------------------------------| + * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e | + * |----------------------------------------------------------------| + * | 40 | 41 | 42 | 45 | 49| 4a| 4b| 4c| 4d| 4e | + * `----------------------------------------------------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_65_ansi( \ + 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, k2d, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k45, k49, k4a, k4b, k4c, k4d, k4e \ +) \ +{ \ + {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, XXX, k2d, k2e}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \ +} diff --git a/keyboards/keebio/iris/keymaps/fsck/config.h b/keyboards/keebio/iris/keymaps/fsck/config.h new file mode 100644 index 0000000000..01bb31a6e1 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/fsck/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2017 Danny Nguyen <danny@keeb.io> + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +// #define USE_I2C +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/iris/keymaps/fsck/keymap.c b/keyboards/keebio/iris/keymaps/fsck/keymap.c new file mode 100644 index 0000000000..bdc707e755 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/fsck/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + + +#define _QWERTY 0 +#define _RAISE 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_DEL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LCTL, MO(_RAISE), KC_ENT, KC_SPC, KC_LGUI, KC_LALT + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + [_RAISE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, KC_UNDS, KC_PLUS, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ESC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_UNDS, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_VOLD, KC_VOLU, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), +}; diff --git a/keyboards/keebio/iris/keymaps/fsck/readme.md b/keyboards/keebio/iris/keymaps/fsck/readme.md new file mode 100644 index 0000000000..88f3127658 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/fsck/readme.md @@ -0,0 +1,3 @@ +![iris:fsck Layout Image](https://i.imgur.com/C2XtWR5.png) + +# fsck's Iris Layout diff --git a/keyboards/kyria/keymaps/corodiak/config.h b/keyboards/kyria/keymaps/corodiak/config.h new file mode 100644 index 0000000000..eed94d0558 --- /dev/null +++ b/keyboards/kyria/keymaps/corodiak/config.h @@ -0,0 +1,45 @@ +/* Copyright 2019 Thomas Baart <thomas@splitkb.com> + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 + +// Turn off on slave +#define WAIT_FOR_USB + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +#define SPLIT_USB_DETECT +#define NO_USB_STARTUP_CHECK + +// Allows to use either side as the master. Look at the documentation for info: +// https://docs.qmk.fm/#/config_options?id=setting-handedness +#define EE_HANDS diff --git a/keyboards/kyria/keymaps/corodiak/keymap.c b/keyboards/kyria/keymaps/corodiak/keymap.c new file mode 100644 index 0000000000..0f7e05991b --- /dev/null +++ b/keyboards/kyria/keymaps/corodiak/keymap.c @@ -0,0 +1,321 @@ +/* Copyright 2019 Thomas Baart <thomas@splitkb.com> + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +typedef union { + uint32_t raw; + struct { + bool osIsWindows; + }; +} user_config_t; + +user_config_t user_config; + +enum layers { + _QWERTY = 0, + _COLEMAK, + _NAV, + _SYMBOLS, + _NUM, + _ADJUST +}; + +enum custom_keycodes { + Qwerty = SAFE_RANGE, + Colemak, + Undo, + Cut, + Copy, + Paste, + NxtWord, + PrvWord +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | TAB | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | NAV | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B |Enter | ESC | |ADJUST|Space | N | M | , < | . > | / ? | Del | + * `----------------------+------+------+------+ +------| |------+ +------+------+------+----------------------' + * | LCTL | GUI | RALT | | NUM | | NUM | | SYMB | NAV |LEADER| + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_BSPC, + MO(_NAV), KC_A , KC_S , KC_D , KC_F , KC_G , KC_H, KC_J , KC_K , KC_L ,KC_SCLN, KC_QUOT, + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , XXXXXXX, KC_ESC , MO(_ADJUST), XXXXXXX, KC_N, KC_M ,KC_COMM, KC_DOT ,KC_SLSH, RSFT_T(KC_DEL), + KC_LCTL, KC_LGUI, KC_RALT, KC_ENT ,TT(_NUM),TT(_NUM), KC_SPC, MO(_SYMBOLS), MO(_NAV), KC_LEAD + ), + +/* + * Base Layer: Colemak + * + * ,-------------------------------------------. ,-------------------------------------------. + * | TAB | Q | W | F | P | G | | J | L | U | Y | ; : | Bksp | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | NAV | A | R | S | T | D | | H | N | E | I | O | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B |Enter | ESC | |ADJUST|Space | K | M | , < | . > | / ? | Del | + * `----------------------+------+------+------+ +------| |------+ +------+------+------+----------------------' + * | LCTL | GUI | RALT | | NUM | | NUM | | SYMB | NAV |LEADER| + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_COLEMAK] = LAYOUT( + KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J, KC_L , KC_U , KC_Y ,KC_SCLN, KC_BSPC, + MO(_NAV), KC_A , KC_R , KC_S , KC_T , KC_D , KC_H, KC_N , KC_E , KC_I , KC_O , KC_QUOT, + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , XXXXXXX, KC_ESC , MO(_ADJUST), XXXXXXX, KC_K, KC_M ,KC_COMM, KC_DOT ,KC_SLSH, RSFT_T(KC_DEL), + KC_LCTL, KC_LGUI, KC_RALT, KC_ENT ,TT(_NUM),TT(_NUM), KC_SPC, MO(_SYMBOLS), MO(_NAV), KC_LEAD + ), + +/* + * Navigation Layer: Cursor, Text Navigation + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | |WheelU| | | | |PrvWord| Up |NxtWord| | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | LCTL |WheelD|LSFT | Bksp | | Bksp | Left | Down |Right | Del | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | Undo | Cut | Copy |Paste | | | | | | | | Home | | End | | | + * `----------------------+------+------+------+ +------| |------+ +------+------+------+----------------------' + * | | | | |Space | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_NAV] = LAYOUT( + _______, _______, _______, KC_WH_U, _______, _______, _______, PrvWord, KC_UP , NxtWord, _______, _______, + _______, _______, KC_LCTL, KC_WH_D, KC_LSFT, KC_BSPC, KC_BSPC, KC_LEFT, KC_DOWN,KC_RIGHT, KC_DEL , _______, + _______, Undo , Cut , Copy , Paste , _______, XXXXXXX, _______, _______, XXXXXXX, _______, KC_HOME, _______, KC_END , _______, _______, + _______, _______, _______, _______, KC_SPC , _______, _______, _______, _______, _______ + ), + +/* + * Symbol Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ` ~ | ! | @ | # | $ | % | | ^ | { | } | | € | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | ~ | | | - _ | = + | & | | * | ( | ) | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | _ | + | | | | | | | | [ { | ] } | | \ | | | + * `----------------------+------+------+------+ +------| |------+ +------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_SYMBOLS] = LAYOUT( + KC_GRV, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, _______,ALGR(KC_5),_______, + KC_TILD, _______, _______, KC_MINS, KC_EQL , KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, KC_PIPE, _______, + _______, _______, _______, KC_UNDS, KC_PLUS, _______, XXXXXXX, _______, _______, XXXXXXX, _______, KC_LBRC, KC_RBRC, _______, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Num Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 ! | 2 @ | 3 # | 4 $ | 5 % | | / | 7 & | 8 * | 9 ( | - | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | | * | 4 $ | 5 % | 6 ^ | + | Space | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | 0 ) | 1 ! | 2 @ | 3 # | = | Enter | + * `----------------------+------+------+------+ +------| |------+ +------+------+------+----------------------' + * | | | | | | | | | | , | . | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_NUM] = LAYOUT( + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_PSLS, KC_7 , KC_8 , KC_9 , KC_PMNS, _______, + _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_PAST, KC_4 , KC_5 , KC_6 , KC_PLUS, KC_SPC , + _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, KC_0 , KC_1 , KC_2 , KC_3 , KC_PEQL, KC_ENT , + _______, _______, _______, _______, _______, _______, _______, _______, KC_PCMM, KC_DOT + ), + +/* + * Adjust Layer: Media + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F9 | F10 | F11 | F12 | | | SAI | | Vol+ | | Play | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | F5 | F6 | F7 | F8 | | | HUI | Prev | Vol- | Nxt | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | | | | | | | VAI | Mute | | | | | + * `----------------------+------+------+------+ +------| |------+ +------+------+------+----------------------' + * |Qwerty|Colemak| | | | | RGB | | RGB | | | + * | Dflt | Dflt | | | | |Toggle| | Mode | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, RGB_SAI, _______, KC_VOLU, _______, KC_MPLY, _______, + _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , _______, RGB_HUI, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, XXXXXXX, _______, _______, XXXXXXX, RGB_VAI, KC_MUTE, _______, _______, _______, _______, + Qwerty , Colemak, _______, _______, _______, RGB_TOG, _______, RGB_MOD, _______, _______ + ), + +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +void keyboard_post_init_user(void) { + // Call the post init code. + + // Read the user config from EEPROM + user_config.raw = eeconfig_read_user(); + + // Default RGB settings, without saving settings + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(HSV_CYAN); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case Qwerty: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + break; + case Colemak: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + break; + case Undo: + if (record->event.pressed) { + if (user_config.osIsWindows == 1) { + tap_code16(C(KC_Z)); + } else if (user_config.osIsWindows == 0) { + tap_code16(G(KC_Z)); + } + } + break; + case Cut: + if (record->event.pressed) { + if (user_config.osIsWindows == 1) { + tap_code16(C(KC_X)); + } else if (user_config.osIsWindows == 0) { + tap_code16(G(KC_X)); + } + } + break; + case Copy: + if (record->event.pressed) { + if (user_config.osIsWindows == 1) { + tap_code16(C(KC_C)); + } else if (user_config.osIsWindows == 0) { + tap_code16(G(KC_C)); + } + } + break; + case Paste: + if (record->event.pressed) { + if (user_config.osIsWindows == 1) { + tap_code16(C(KC_V)); + } else if (user_config.osIsWindows == 0) { + tap_code16(G(KC_V)); + } + } + break; + case PrvWord: + if (record->event.pressed) { + if (user_config.osIsWindows == 1) { + tap_code16(C(KC_LEFT)); + } else if (user_config.osIsWindows == 0) { + tap_code16(A(KC_LEFT)); + } + } + break; + case NxtWord: + if (record->event.pressed) { + if (user_config.osIsWindows == 1) { + tap_code16(C(KC_RGHT)); + } else if (user_config.osIsWindows == 0) { + tap_code16(A(KC_RGHT)); + } + } + break; + } + return true; +}; + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + // Set current OS indicator to macOs + SEQ_ONE_KEY(KC_M) { + user_config.osIsWindows = false; + eeconfig_update_user(user_config.raw); + } + + // Set current OS indicator to Windows + SEQ_ONE_KEY(KC_W) { + user_config.osIsWindows = true; + eeconfig_update_user(user_config.raw); + } + + // Screenshot + SEQ_ONE_KEY(KC_S) { + if (user_config.osIsWindows == 1) { + tap_code16(S(G(KC_S))); + } else if (user_config.osIsWindows == 0) { + tap_code16(S(G(KC_4))); + } + } + + // Video + SEQ_ONE_KEY(KC_V) { + if (user_config.osIsWindows == 0) { + tap_code16(S(G(KC_5))); + } + } + + // Sleep + SEQ_ONE_KEY(KC_P) { + if (user_config.osIsWindows == 1) { + SEND_STRING(SS_LGUI("x") "u" "h"); + } else if (user_config.osIsWindows == 0) { + tap_code16(A(G(KC_PWR))); + } + } + } +} diff --git a/keyboards/kyria/keymaps/corodiak/rules.mk b/keyboards/kyria/keymaps/corodiak/rules.mk new file mode 100644 index 0000000000..da64c4ea51 --- /dev/null +++ b/keyboards/kyria/keymaps/corodiak/rules.mk @@ -0,0 +1,4 @@ +# OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +# ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +LEADER_ENABLE = yes # Enables the Leader shortcut funtionality diff --git a/keyboards/lazydesigners/dimple/config.h b/keyboards/lazydesigners/dimple/config.h index 5c36a72527..a72c78cb3c 100644 --- a/keyboards/lazydesigners/dimple/config.h +++ b/keyboards/lazydesigners/dimple/config.h @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4C44 // "LD" #define PRODUCT_ID 0x0040 #define DEVICE_VER 0x0001 #define MANUFACTURER LazyDesigners diff --git a/keyboards/lazydesigners/dimple/keymaps/via/keymap.c b/keyboards/lazydesigners/dimple/keymaps/via/keymap.c new file mode 100644 index 0000000000..d3bfed176c --- /dev/null +++ b/keyboards/lazydesigners/dimple/keymaps/via/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +/* THIS FILE WAS GENERATED! + * + * This file was generated by QMK CLI. You may or may not want to + * edit it directly. + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_DOT, KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT), + [1] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [2] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [3] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) +}; + +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { + dimple_led_on(); + } else { + dimple_led_off(); + } + return false; +} diff --git a/keyboards/lazydesigners/dimple/keymaps/via/rules.mk b/keyboards/lazydesigners/dimple/keymaps/via/rules.mk new file mode 100644 index 0000000000..f2e549c7b7 --- /dev/null +++ b/keyboards/lazydesigners/dimple/keymaps/via/rules.mk @@ -0,0 +1,10 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +# These features are not (yet) supported by VIA +LEADER_ENABLE = no +FAUXCLICKY_ENABLE = no +MIDI_ENABLE = no +BLUETOOTH_ENABLE = no +KEY_LOCK_ENABLE = no +TERMINAL_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/lazydesigners/the30/config.h b/keyboards/lazydesigners/the30/config.h index fdd76fe730..63b1637c23 100644 --- a/keyboards/lazydesigners/the30/config.h +++ b/keyboards/lazydesigners/the30/config.h @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4C44 // "LD" #define PRODUCT_ID 0x0030 #define DEVICE_VER 0x0001 #define MANUFACTURER LazyDesigners diff --git a/keyboards/lazydesigners/the50/config.h b/keyboards/lazydesigners/the50/config.h index 72246eabac..c46dcbeb1a 100644 --- a/keyboards/lazydesigners/the50/config.h +++ b/keyboards/lazydesigners/the50/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4C44 // "LD" #define PRODUCT_ID 0x0050 #define DEVICE_VER 0x0001 #define MANUFACTURER LazyDesigners diff --git a/keyboards/lazydesigners/the60/config.h b/keyboards/lazydesigners/the60/config.h index d6bd2205c6..2929ad2adb 100644 --- a/keyboards/lazydesigners/the60/config.h +++ b/keyboards/lazydesigners/the60/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4C44 // "LD" #define PRODUCT_ID 0x0060 #define DEVICE_VER 0x0001 #define MANUFACTURER LazyDesigners diff --git a/keyboards/m0lly/config.h b/keyboards/m0lly/config.h index 010833ac80..327b0f08c1 100644 --- a/keyboards/m0lly/config.h +++ b/keyboards/m0lly/config.h @@ -67,6 +67,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define QMK_ESC_OUTPUT A0 // usually COL +#define QMK_ESC_INPUT F4 // usually ROW +#define QMK_LED D2 // NumLock on M0lly +//#define QMK_SPEAKER C6 + /* * Force NKRO * diff --git a/keyboards/m0lly/i2c.c b/keyboards/m0lly/i2c.c deleted file mode 100644 index cd2b835d50..0000000000 --- a/keyboards/m0lly/i2c.c +++ /dev/null @@ -1,166 +0,0 @@ -#include <util/twi.h> -#include <avr/io.h> -#include <stdlib.h> -#include <avr/interrupt.h> -#include <util/twi.h> -#include <stdbool.h> -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT) - lim++; - - // easier way, but will wait slightly longer - // _delay_us(100); -} - -// Setup twi to run at 100kHz -void i2c_master_init(void) { - // no prescaler - TWSR = 0; - // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN); - - i2c_delay(); - - // check that we started successfully - if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) - return 1; - - // send device address - TWDR = address; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) ) - return 1; // slave did not acknowledge - else - return 0; // success -} - - -// Finish the i2c transaction. -void i2c_master_stop(void) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); - - uint16_t lim = 0; - while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT) - lim++; -} - -// Write one byte to the i2c slave. -// returns 0 => slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - // check if the slave acknowledged us - return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1; -} - -// Read one byte from the i2c slave. If ack=1 the slave is acknowledged, -// if ack=0 the acknowledge bit is not set. -// returns: byte read from i2c device -uint8_t i2c_master_read(int ack) { - TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA); - - i2c_delay(); - return TWDR; -} - -void i2c_reset_state(void) { - TWCR = 0; -} - -void i2c_slave_init(uint8_t address) { - TWAR = address << 0; // slave i2c address - // TWEN - twi enable - // TWEA - enable address acknowledgement - // TWINT - twi interrupt flag - // TWIE - enable the twi interrupt - TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN); -} - -ISR(TWI_vect); - -ISR(TWI_vect) { - uint8_t ack = 1; - switch(TW_STATUS) { - case TW_SR_SLA_ACK: - // this device has been addressed as a slave receiver - slave_has_register_set = false; - break; - - case TW_SR_DATA_ACK: - // this device has received data as a slave receiver - // The first byte that we receive in this transaction sets the location - // of the read/write location of the slaves memory that it exposes over - // i2c. After that, bytes will be written at slave_buffer_pos, incrementing - // slave_buffer_pos after each write. - if(!slave_has_register_set) { - slave_buffer_pos = TWDR; - // don't acknowledge the master if this memory loctaion is out of bounds - if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); -} - - - -#endif diff --git a/keyboards/m0lly/i2c.h b/keyboards/m0lly/i2c.h deleted file mode 100644 index 2bd7f40968..0000000000 --- a/keyboards/m0lly/i2c.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef I2C_H -#define I2C_H - -#include <stdint.h> - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 800000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/m0lly/keymaps/default/keymap.c b/keyboards/m0lly/keymaps/default/keymap.c index 784deb04a7..5f6211f0f5 100644 --- a/keyboards/m0lly/keymaps/default/keymap.c +++ b/keyboards/m0lly/keymaps/default/keymap.c @@ -13,11 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ + #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" - //Layers @@ -26,13 +23,6 @@ enum { FUNCTION, }; -bool screenWorks = 0; - -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Base","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap BASE: (Base Layer) Default Layer * @@ -78,72 +68,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - if ( iota_gfx_init() ) { // turns on the display - screenWorks = 1; - } - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - if ( screenWorks ) { - iota_gfx_task(); // this is what updates the display continuously - }; - #endif -} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_P(PSTR("Base\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC M0LLY")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", - (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", - (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); - matrix_write(&matrix, led); - matrix_update(&display, &matrix); + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } +#endif
\ No newline at end of file diff --git a/keyboards/m0lly/rules.mk b/keyboards/m0lly/rules.mk index 60140160c2..05e6290759 100644 --- a/keyboards/m0lly/rules.mk +++ b/keyboards/m0lly/rules.mk @@ -9,12 +9,12 @@ MCU = at90usb1286 # QMK DFU qmk-dfu # ATmega32A bootloadHID # ATmega328P USBasp -BOOTLOADER = atmel-dfu +BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -29,6 +29,4 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - -SRC = i2c.c \ - ssd1306.c +OLED_DRIVER_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/massdrop/alt/keymaps/emptyflask/README.md b/keyboards/massdrop/alt/keymaps/emptyflask/README.md new file mode 100644 index 0000000000..b07693ebac --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/emptyflask/README.md @@ -0,0 +1,14 @@ +### Drop (Massdrop) ALT Layout + +This layout is for the [Drop ALT Keyboard](https://drop.com/buy/massdrop-alt-high-profile-mechanical-keyboard). + +Features: + +* Tap caps lock for ESC, hold for CTRL +* Prefer grave/tilde to dedicated ESC key +* Swap home and delete. It's more compatible with my keycaps, and closer to a traditional layout. +* Numpad layer (FN-\ to enable) +* Method for clearing all stuck-down mods (taken from favorable-mutation, for tapped modifiers) + +To do: +* Customize RGB: solid colors by default, highlight numpad keys when using that layer. diff --git a/keyboards/massdrop/alt/keymaps/emptyflask/config.h b/keyboards/massdrop/alt/keymaps/emptyflask/config.h new file mode 100644 index 0000000000..b3152c4209 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/emptyflask/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define ONESHOT_TIMEOUT 3000 diff --git a/keyboards/massdrop/alt/keymaps/emptyflask/keymap.c b/keyboards/massdrop/alt/keymaps/emptyflask/keymap.c new file mode 100644 index 0000000000..6ef6e2aa5e --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/emptyflask/keymap.c @@ -0,0 +1,292 @@ +#include QMK_KEYBOARD_H + +enum my_keycodes { + U_T_AUTO = SAFE_RANGE, // USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, // USB Toggle Automatic GCR control + DBG_TOG, // DEBUG Toggle On / Off + DBG_MTRX, // DEBUG Toggle Matrix Prints + DBG_KBD, // DEBUG Toggle Keyboard Prints + DBG_MOU, // DEBUG Toggle Mouse Prints + MD_BOOT, // Restart into bootloader after hold timeout + HK_COSL, // Clear held-down keys + QWERTY, // Switch to QWERTY layout + COLEMAK, // Switch to Colemak layout + DVORAK, // Switch to Dvorak layout + WORKMAN, // Switch to Workman layout +}; + +enum my_layers { + _QWERTY = 0, + _COLEMAK, + _DVORAK, + _WORKMAN, + _FUNCTION, + _NUMPAD, + _LAYOUTS, +}; + +#define CTL_ESC LCTL_T(KC_ESC) // Tap for ESC, hold for CTRL +#define MD_LOCK LCTL(LGUI(KC_Q)) // MacOS lock screen shortcut +#define MO_FUNC MO(_FUNCTION) // Hold for function layer +#define TG_NUMP TG(_NUMPAD) // Toggle numpad layer +#define OSL_LAY OSL(_LAYOUTS) // One-shot layer to change layout + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY + * ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬────────────┬───────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ BackSpace │ Home │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬─────────┼───────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ Del │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─────────┼───────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ Ctrl/Esc │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Return │ PgUp │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────────────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴───────┬───────┼───────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ Up │ PgDn │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────────┬─────┴───┬───┴─────┬─┴───────┴───────┴───────┴───────┴───────┴─────┬─┴───────┼───────┴─┬──┬───────┼───────┼───────┤ + * │ │ │ │ │ │ │▒▒│ │ │ │ + * │ Ctrl │ GUI │ Alt │ Space │ Alt │ Func │▒▒│ Left │ Down │ Right │ + * │ │ │ │ │ │ │▒▒│ │ │ │ + * └─────────┴─────────┴─────────┴───────────────────────────────────────────────┴─────────┴─────────┴──┴───────┴───────┴───────┘ + */ + [_QWERTY] = LAYOUT_65_ansi_blocker( + 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_HOME, + 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, + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_COLEMAK] = LAYOUT_65_ansi_blocker( + 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_HOME, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_DVORAK] = LAYOUT_65_ansi_blocker( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_HOME, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL, + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGUP, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_WORKMAN] = LAYOUT_65_ansi_blocker( + 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_HOME, + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + CTL_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Function layer + * ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬────────────┬───────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ Del │ End │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬─────────┼───────┤ + * │ │ RGB │ RGB │ RGB │ RGB │ RGB │ │ USB │ USB │ │ │ │ │ │ │ + * │ │ Speed │ Val │ Speed │ Hue │ Sat │ │ Port │ GCR │ │ PrtSc │ ScrLk │ Pause │ NumPad │ Mute │ + * │ │ - │ + │ + │ + │ + │ │ │ │ │ │ │ │ │ │ + * ├──────────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─────────┼───────┤ + * │ │ RGB │ RGB │ RGB │ RGB │ RGB │ │ │ │ (Mac) │ │ │ │ │ + * │ CapsLock │ Mode │ Val │ Mode │ Hue │ Sat │ │ │ │ Lock │ │ │ │ Vol+ │ + * │ │ - │ - │ + │ - │ - │ │ │ │ │ │ │ │ │ + * ├────────────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴───────┬───────┼───────┤ + * │ │ RGB │ │ │ │ │ 6KRO/ │ │ │ │ │ │ │ │ + * │ │ On/Off│ │ │ │Restart│ NKRO │ Debug │ │ │ Layout│ │ PgUp │ Vol- │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────────┬─────┴───┬───┴─────┬─┴───────┴───────┴───────┴───────┴───────┴─────┬─┴───────┼───────┴─┬──┬───────┼───────┼───────┤ + * │ │ │ │ │ │ │▒▒│ │ │ │ + * │ │ │ │ Clear modifiers │ │ │▒▒│ Home │ PgDn │ End │ + * │ │ │ │ │ │ │▒▒│ │ │ │ + * └─────────┴─────────┴─────────┴───────────────────────────────────────────────┴─────────┴─────────┴──┴───────┴───────┴───────┘ + */ + [_FUNCTION] = LAYOUT_65_ansi_blocker( + 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_DEL, KC_END, + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, TG_NUMP, KC_MUTE, + KC_CAPS, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, MD_LOCK, _______, _______, _______, KC_VOLU, + _______, RGB_TOG, _______, _______, _______, MD_BOOT, NK_TOGG, DBG_TOG, _______, _______, OSL_LAY, _______, KC_PGUP, KC_VOLD, + _______, _______, _______, HK_COSL, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + /* Number pad (FN-\ to toggle) + * ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬────────────┬───────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ / │ * │ - │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬─────────┼───────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ 7 │ 8 │ 9 │ + │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─────────┼───────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ 4 │ 5 │ 6 │ + │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────────────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴───────┬───────┼───────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ 1 │ 2 │ 3 │ = │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────────┬─────┴───┬───┴─────┬─┴───────┴───────┴───────┴───────┴───────┴─────┬─┴───────┼───────┴─┬──┬───────┼───────┼───────┤ + * │ │ │ │ │ │ │▒▒│ │ │ │ + * │ │ │ │ 0 │ . │ │▒▒│ │ │ │ + * │ │ │ │ │ │ │▒▒│ │ │ │ + * └─────────┴─────────┴─────────┴───────────────────────────────────────────────┴─────────┴─────────┴──┴───────┴───────┴───────┘ + */ + [_NUMPAD] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PEQL, _______, _______, _______, + _______, _______, _______, KC_P0, KC_PDOT, _______, _______, _______, _______ + ), + + /* Alternate layouts (FN-/ then one of [Q,C,D,W]) */ + [_LAYOUTS] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, QWERTY, WORKMAN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, COLEMAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Template + * ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬────────────┬───────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬─────────┼───────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─┬─────┴─────────┼───────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────────────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴──┬────┴───────┬───────┼───────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────────┬─────┴───┬───┴─────┬─┴───────┴───────┴───────┴───────┴───────┴─────┬─┴───────┼───────┴─┬──┬───────┼───────┼───────┤ + * │ │ │ │ │ │ │▒▒│ │ │ │ + * │ │ │ │ │ │ │▒▒│ │ │ │ + * │ │ │ │ │ │ │▒▒│ │ │ │ + * └─────────┴─────────┴─────────┴───────────────────────────────────────────────┴─────────┴─────────┴──┴───────┴───────┴───────┘ + [X] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + */ +}; + +#define MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) +#define MODS_CTRL (get_mods() & MOD_MASK_CTRL) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return true; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return true; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return true; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return true; + case HK_COSL: + clear_keyboard(); + reset_oneshot_layer(); + return true; + case U_T_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/config.h index ed54af2394..262abdeb18 100644 --- a/keyboards/projectkb/alice/config.h +++ b/keyboards/projectkb/alice/config.h @@ -66,6 +66,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Let VIA handle the QMK RGBLIGHT #define VIA_QMK_RGBLIGHT_ENABLE +// 2 bits for 4 layout options +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/projectkb/alice/keymaps/via/keymap.c b/keyboards/projectkb/alice/keymaps/via/keymap.c new file mode 100644 index 0000000000..a75bb8d977 --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* +Copyright 2020 Ryan Castillo <castillo.ryanmiguel@gmail.com> + +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 <http://www.gnu.org/licenses/>. +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_default( + KC_ESC, KC_TILD, 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_DEL, 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_BSLS, + KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RGUI, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_default( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_default( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_default( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) + +}; diff --git a/keyboards/projectkb/alice/keymaps/via/rules.mk b/keyboards/projectkb/alice/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/splitreus62/config.h b/keyboards/splitreus62/config.h new file mode 100644 index 0000000000..51b4af7179 --- /dev/null +++ b/keyboards/splitreus62/config.h @@ -0,0 +1,77 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xBEEF +#define PRODUCT_ID 0xFED0 +#define DEVICE_VER 0x0001 +#define MANUFACTURER NaCly +#define PRODUCT Splitreus62 +#define DESCRIPTION Like you axed an atreus62 + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D3, D2, D1, D4, C6, D7 } +#define MATRIX_COL_PINS { E6, B4, B5, B6, B2, B3 } + +#define DIODE_DIRECTION ROW2COL + +#define SPLIT_HAND_PIN F4 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B1 + +#define RGBLED_NUM 12 // Number of LEDs + +#define RGBLED_SPLIT { 6, 6 } +/* + * 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 diff --git a/keyboards/splitreus62/info.json b/keyboards/splitreus62/info.json new file mode 100644 index 0000000000..b6f32b4d27 --- /dev/null +++ b/keyboards/splitreus62/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "splitreus62", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5.7, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0.6}, {"x":1, "y":0.6}, {"x":2, "y":0.35}, {"x":3, "y":0}, {"x":4, "y":0.35}, {"x":5, "y":0.7}, {"x":9, "y":0.7}, {"x":10, "y":0.35}, {"x":11, "y":0}, {"x":12, "y":0.35}, {"x":13, "y":0.6}, {"x":14, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.6}, {"x":2, "y":1.35}, {"x":3, "y":1}, {"x":4, "y":1.35}, {"x":5, "y":1.7}, {"x":9, "y":1.7}, {"x":10, "y":1.35}, {"x":11, "y":1}, {"x":12, "y":1.35}, {"x":13, "y":1.6}, {"x":14, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.6}, {"x":2, "y":2.35}, {"x":3, "y":2}, {"x":4, "y":2.35}, {"x":5, "y":2.7}, {"x":9, "y":2.7}, {"x":10, "y":2.35}, {"x":11, "y":2}, {"x":12, "y":2.35}, {"x":13, "y":2.6}, {"x":14, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.6}, {"x":2, "y":3.35}, {"x":3, "y":3}, {"x":4, "y":3.35}, {"x":5, "y":3.7}, {"x":9, "y":3.7}, {"x":10, "y":3.35}, {"x":11, "y":3}, {"x":12, "y":3.35}, {"x":13, "y":3.6}, {"x":14, "y":3.6}, {"x":0, "y":4.6}, {"x":1, "y":4.6}, {"x":2, "y":4.35}, {"x":3, "y":4}, {"x":4, "y":4.35}, {"x":5, "y":4.7}, {"x":6, "y":3.95, "h":1.5}, {"x":8, "y":3.95, "h":1.5}, {"x":9, "y":4.7}, {"x":10, "y":4.35}, {"x":11, "y":4}, {"x":12, "y":4.35}, {"x":13, "y":4.6}, {"x":14, "y":4.6}] + } + } + } diff --git a/keyboards/splitreus62/keymaps/default/keymap.c b/keyboards/splitreus62/keymaps/default/keymap.c new file mode 100644 index 0000000000..0137b7e3d9 --- /dev/null +++ b/keyboards/splitreus62/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2019 NaCly + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, LT(1,KC_F), KC_G, KC_H, LT(2,KC_J), KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, KC_EQL, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_LBRC, KC_RBRC, KC_HOME, KC_END, KC_ESC + ), + //Holding F + [1] = LAYOUT( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + //Holding J + [2] = LAYOUT( + KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, TG(3) + ), + //game layer + [3] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, LT(2,KC_J), KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_NO, KC_LALT, KC_GRV, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_LBRC, KC_RBRC, KC_HOME, KC_END, TO(0) + ) +}; diff --git a/keyboards/splitreus62/readme.md b/keyboards/splitreus62/readme.md new file mode 100644 index 0000000000..34fda47535 --- /dev/null +++ b/keyboards/splitreus62/readme.md @@ -0,0 +1,13 @@ +# splitreus62 + +A split version of the [Atreus62](https://github.com/profet23/atreus62) by Profet23, which itself is based on Phil Hagelberg's [Atreus](https://github.com/technomancy/atreus). You can copy keymaps from Atreus62 and use them with this keyboard. + +* Keyboard Maintainer: [NaCly](https://github.com/Na-Cly) +* Hardware Supported: splitreus62 PCBs, Pro Micro +* Hardware Availability: https://github.com/Na-Cly/splitreus62 + +Make example for this keyboard (after setting up your build environment): + + make splitreus62: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/splitreus62/rules.mk b/keyboards/splitreus62/rules.mk new file mode 100644 index 0000000000..ad3095be41 --- /dev/null +++ b/keyboards/splitreus62/rules.mk @@ -0,0 +1,35 @@ +# 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 = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI controls +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 +UNICODE_ENABLE = no # Unicode + +SPLIT_KEYBOARD = yes diff --git a/keyboards/splitreus62/splitreus62.c b/keyboards/splitreus62/splitreus62.c new file mode 100644 index 0000000000..d6ea3f9135 --- /dev/null +++ b/keyboards/splitreus62/splitreus62.c @@ -0,0 +1 @@ +#include "splitreus62.h" diff --git a/keyboards/splitreus62/splitreus62.h b/keyboards/splitreus62/splitreus62.h new file mode 100644 index 0000000000..bc6c2a9131 --- /dev/null +++ b/keyboards/splitreus62/splitreus62.h @@ -0,0 +1,26 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT(\ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L55, R55, R45, R44, R43, R42, R41, R40 \ +)\ + {\ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, L55 }, \ +\ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, R55 } \ +} diff --git a/keyboards/tkc1800/config.h b/keyboards/tkc1800/config.h index a45fb677e5..5ba40bb35c 100644 --- a/keyboards/tkc1800/config.h +++ b/keyboards/tkc1800/config.h @@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x544B // "TK" +#define PRODUCT_ID 0x0001 #define DEVICE_VER 0x0003 #define MANUFACTURER The Key Company #define PRODUCT TKC1800 diff --git a/keyboards/tkc1800/keymaps/via/config.h b/keyboards/tkc1800/keymaps/via/config.h new file mode 100644 index 0000000000..579212d4a3 --- /dev/null +++ b/keyboards/tkc1800/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/tkc1800/keymaps/via/keymap.c b/keyboards/tkc1800/keymaps/via/keymap.c new file mode 100644 index 0000000000..5455934a30 --- /dev/null +++ b/keyboards/tkc1800/keymaps/via/keymap.c @@ -0,0 +1,159 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H +#include "LUFA/Drivers/Peripheral/TWI.h" +#include "i2c.h" +#include "ssd1306.h" + + +//Layers + +enum { + BASE = 0, + FUNCTION, +}; + +bool screenWorks = 0; + +//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() +static char layer_lookup[][14] = {"Base","Function"}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------------------------------------------. ,-------------------. + * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| + * `-------------------------------------------------------' |-------------------| + * |Del |End |PgDn|ScrL| + * ,-----------------------------------------------------------. |-------------------| + * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | + * |-----------------------------------------------------------| |-------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | + * |-----------------------------------------------------------' |-------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| + * |--------------------------------------------------------'----`--------------| | + * |Ctrl|Gui |Alt | Space |Alt |Fn |Ctr|Left |Down|Rght| 0 | . | | + * `---------------------------------------------------------------------------------' + */ + [BASE] = LAYOUT( + 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_INS, KC_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + 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, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + 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_P7, KC_P8, KC_P9, KC_PMNS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_LSFT, XXXXXXX, 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, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ + ), + /* Keymap FUNCTION: (Function Layer) + * ,-------------------------------------------------------. ,-------------------. + * | | | | | | | | | | | | | | | | | | | | | + * `-------------------------------------------------------' |-------------------| + * | | | | | + * ,-----------------------------------------------------------. |-------------------| + * | | | | | | | | | | | | | | RESET | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' |-------------------| + * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | + * |--------------------------------------------------------'----`--------------| | + * | | | | | | | | | | | | . | | + * `---------------------------------------------------------------------------------' + */ + [FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} + +void matrix_init_user(void) { + #ifdef USE_I2C + i2c_master_init(); + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + if ( iota_gfx_init() ) { // turns on the display + screenWorks = 1; + } + #endif + #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +void matrix_scan_user(void) { + #ifdef SSD1306OLED + if ( screenWorks ) { + iota_gfx_task(); // this is what updates the display continuously + }; + #endif +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif + + struct CharacterMatrix matrix; + + matrix_clear(&matrix); + matrix_write_P(&matrix, PSTR("TKC1800")); + + uint8_t layer = biton32(layer_state); + + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%d", layer); + matrix_write_P(&matrix, PSTR("\nLayer: ")); + matrix_write(&matrix, layer_lookup[layer]); + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n\n%s %s %s", + (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", + (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", + (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); + matrix_write(&matrix, led); + matrix_update(&display, &matrix); +} diff --git a/keyboards/tkc1800/keymaps/via/rules.mk b/keyboards/tkc1800/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/tkc1800/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/tkc1800/rules.mk b/keyboards/tkc1800/rules.mk index 60140160c2..7cc3bbe20b 100644 --- a/keyboards/tkc1800/rules.mk +++ b/keyboards/tkc1800/rules.mk @@ -14,11 +14,11 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # 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 +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # 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 diff --git a/keyboards/uranuma/config.h b/keyboards/uranuma/config.h new file mode 100644 index 0000000000..e4a62d88e5 --- /dev/null +++ b/keyboards/uranuma/config.h @@ -0,0 +1,236 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x112D +#define DEVICE_VER 0x0001 +#define MANUFACTURER yohewi +#define PRODUCT UraNuma +#define DESCRIPTION Series of numa + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 10 + +/* + * 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 { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D2, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +// fix iPhone and iPad power adapter issue +// iOS device need lessthan 100 +#define USB_MAX_POWER_CONSUMPTION 100 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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. + * + */ + +/* 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 +//#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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/uranuma/info.json b/keyboards/uranuma/info.json new file mode 100644 index 0000000000..8c4f5cb48e --- /dev/null +++ b/keyboards/uranuma/info.json @@ -0,0 +1,63 @@ +{ + "keyboard_name": "Uranuma", + "url": "", + "maintainer": "yohewi", + "width": 13, + "height": 5.7, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k00", "x":0 , "y":0.62}, + {"label":"k01", "x":1 , "y":0.36}, + {"label":"k02", "x":2 , "y":0}, + {"label":"k03", "x":3 , "y":0.09}, + {"label":"k04", "x":4 , "y":0.70}, + {"label":"k05", "x":8 , "y":0.70}, + {"label":"k06", "x":9 , "y":0.09}, + {"label":"k07", "x":10, "y":0}, + {"label":"k08", "x":11, "y":0.36}, + {"label":"k09", "x":12, "y":0.62}, + + {"label":"k10", "x":0 , "y":1.62}, + {"label":"k11", "x":1 , "y":1.36}, + {"label":"k12", "x":2 , "y":1}, + {"label":"k13", "x":3 , "y":1.09}, + {"label":"k14", "x":4 , "y":1.70}, + {"label":"k15", "x":8 , "y":1.70}, + {"label":"k16", "x":9 , "y":1.09}, + {"label":"k17", "x":10, "y":1}, + {"label":"k18", "x":11, "y":1.36}, + {"label":"k19", "x":12, "y":1.62}, + + {"label":"k20", "x":0 , "y":2.62}, + {"label":"k21", "x":1 , "y":2.36}, + {"label":"k22", "x":2 , "y":2}, + {"label":"k23", "x":3 , "y":2.09}, + {"label":"k24", "x":4 , "y":2.70}, + {"label":"k25", "x":8 , "y":2.70}, + {"label":"k26", "x":9 , "y":2.09}, + {"label":"k27", "x":10, "y":2}, + {"label":"k28", "x":11, "y":2.36}, + {"label":"k29", "x":12, "y":2.62}, + + {"label":"k30", "x":0 , "y":3.62}, + {"label":"k31", "x":1 , "y":3.36}, + {"label":"k32", "x":2 , "y":3}, + {"label":"k33", "x":3 , "y":3.09}, + {"label":"k34", "x":4 , "y":3.70}, + {"label":"k44", "x":5, "y":2.44, "h":2}, + {"label":"k45", "x":7, "y":2.44, "h":2}, + {"label":"k35", "x":8 , "y":3.70}, + {"label":"k36", "x":9 , "y":3.09}, + {"label":"k37", "x":10, "y":3}, + {"label":"k38", "x":11, "y":3.36}, + {"label":"k39", "x":12, "y":3.62}, + + {"label":"k40", "x":0, "y":4.70, "w":1.5}, + {"label":"k41", "x":1.5, "y":4.70}, + {"label":"k48", "x":10.5, "y":4.70}, + {"label":"k49", "x":11.5, "y":4.70, "w":1.5} + ] + } + } +} diff --git a/keyboards/uranuma/keymaps/default/keymap.c b/keyboards/uranuma/keymaps/default/keymap.c new file mode 100644 index 0000000000..c2ac4d8bf9 --- /dev/null +++ b/keyboards/uranuma/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +#include QMK_KEYBOARD_H + +enum layer_number { + _BASE, + _LOWER, + _RAISE, +}; + +enum custom_keycodes { + KANJI = SAFE_RANGE, +}; + +// Layer Mode aliases +#define KC_ZSFT LSFT_T(KC_Z) +#define KC_MNSF LSFT_T(KC_MINS) +#define KC_ESCT LCTL_T(KC_ESC) +#define KC_TBAL LALT_T(KC_TAB) +#define ALT_GRV LALT(KC_GRV) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //.--------------------------------------------. .--------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_BSLS, + //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| + KC_ZSFT, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_MNSF, + //|--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------| + KC_ESCT, KC_TBAL, KC_PSCR, KC_LALT, KC_SPC, KC_BSPC, KC_ENT, KC_ENT, ALT_GRV, KC_SLSH, KC_BSLS, KC_RBRC, + //|--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------| + KC_LSFT, LOWER, RAISE, KC_RCTL + //'-----------------' '-----------------' + ), + + [_LOWER] = LAYOUT( + //.--------------------------------------------. .--------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| + KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_UP, KC_EQL, + //|--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------| + KC_ESCT, KC_TBAL, KC_LGUI, KC_ENT, KC_BSPC, KC_SPC, KC_ENT, KC_LALT, KANJI, KC_LEFT, KC_DOWN, KC_RGHT, + //|--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------| + KC_LSFT, LOWER, RAISE, KC_RCTL + //'-----------------' '-----------------' + ), + + [_RAISE] = LAYOUT( + //.--------------------------------------------. .--------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| + KC_F11, KC_F12, XXXXXXX, KANJI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_RO, + //|--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------| + KC_ESCT, KC_TBAL, KC_LGUI, LOWER, KC_BSPC, KC_SPC, KC_ENT, KC_ENT, KANJI, KC_LEFT, KC_DOWN, KC_RGHT, + //|--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------| + KC_RSFT, LOWER, RAISE, KC_RCTL + //'-----------------' '-----------------' + ), + +}; diff --git a/keyboards/uranuma/readme.md b/keyboards/uranuma/readme.md new file mode 100644 index 0000000000..3e78fa6fe6 --- /dev/null +++ b/keyboards/uranuma/readme.md @@ -0,0 +1,15 @@ +# uranuma + +It is a keyboard to input using fingers and palms. + + +* Keyboard Maintainer: yohewi(yohewi@gmail.com) +* Hardware Supported: UraNuma PCB +* Github [github.com/yohewi](https://github.com/yohewi) +* Hardware Availability: PCB, [Booth Shop](https://rt421.booth.pm/) + +Make example for this keyboard (after setting up your build environment): + + make uranuma: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/uranuma/rules.mk b/keyboards/uranuma/rules.mk new file mode 100644 index 0000000000..d30114df48 --- /dev/null +++ b/keyboards/uranuma/rules.mk @@ -0,0 +1,36 @@ +# 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 = atmel-dfu + +# 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 +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +#COMBO_ENABLE = yes +#SRC += .nicola.c \ diff --git a/keyboards/uranuma/uranuma.c b/keyboards/uranuma/uranuma.c new file mode 100644 index 0000000000..e439177af7 --- /dev/null +++ b/keyboards/uranuma/uranuma.c @@ -0,0 +1 @@ +#include "uranuma.h" diff --git a/keyboards/uranuma/uranuma.h b/keyboards/uranuma/uranuma.h new file mode 100644 index 0000000000..8b2e4c6930 --- /dev/null +++ b/keyboards/uranuma/uranuma.h @@ -0,0 +1,26 @@ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k44, k45, k35, k36, k37, k38, k39, \ + k40, k41, k48, k49 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, KC_NO, KC_NO, k44, k45, KC_NO, KC_NO, k48, k49 } \ +} diff --git a/keyboards/wheatfield/blocked65/blocked65.c b/keyboards/wheatfield/blocked65/blocked65.c new file mode 100644 index 0000000000..81da8005b0 --- /dev/null +++ b/keyboards/wheatfield/blocked65/blocked65.c @@ -0,0 +1 @@ +#include "blocked65.h" diff --git a/keyboards/wheatfield/blocked65/blocked65.h b/keyboards/wheatfield/blocked65/blocked65.h new file mode 100644 index 0000000000..09fe673a66 --- /dev/null +++ b/keyboards/wheatfield/blocked65/blocked65.h @@ -0,0 +1,18 @@ +#pragma once +#include "quantum.h" + +// readability +#define _x_ KC_NO +#define LAYOUT_65_ansi_blocker( \ + 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, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +){ \ + { 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, _x_, K2D, K2E }, \ + { K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, _x_, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/wheatfield/blocked65/config.h b/keyboards/wheatfield/blocked65/config.h new file mode 100644 index 0000000000..ebcbf8fc68 --- /dev/null +++ b/keyboards/wheatfield/blocked65/config.h @@ -0,0 +1,61 @@ +/* +Copyright 2019 Maarten Dekkers <maartenwut@gmail.com> + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Dou +#define PRODUCT Blocked65 +#define DESCRIPTION 65% keyboard with arrow cluster blocker + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 6 + +/* Set 0 if debouncing isn't 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 + +/* Backlight configuration + */ +#define RGB_DI_PIN E2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2
\ No newline at end of file diff --git a/keyboards/wheatfield/blocked65/info.json b/keyboards/wheatfield/blocked65/info.json new file mode 100644 index 0000000000..75e15f524b --- /dev/null +++ b/keyboards/wheatfield/blocked65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Wheatfield blocked 65% keyboard", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"PrScr", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Fn", "x":10, "y":4, "w":1.25}, {"label":"Alt", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} diff --git a/keyboards/wheatfield/blocked65/keymaps/default/keymap.c b/keyboards/wheatfield/blocked65/keymaps/default/keymap.c new file mode 100644 index 0000000000..c38a103101 --- /dev/null +++ b/keyboards/wheatfield/blocked65/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum layers { + _BL, + _FL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT_65_ansi_blocker( + KC_GESC, 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FL] = LAYOUT_65_ansi_blocker( + KC_GRV, 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_PSCR, + KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG, RGB_VAI, RGB_HUI, RGB_SAI, KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, RGB_MOD, RGB_VAD, RGB_HUD, RGB_SAD, KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, + KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, BL_TOGG, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, RGB_MOD, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, RESET, KC_RALT, KC_TRNS, KC_HOME, BL_STEP, KC_END + ) + +}; diff --git a/keyboards/wheatfield/blocked65/readme.md b/keyboards/wheatfield/blocked65/readme.md new file mode 100644 index 0000000000..42cf5b24e2 --- /dev/null +++ b/keyboards/wheatfield/blocked65/readme.md @@ -0,0 +1,13 @@ +# Wheatfield Blocked65% + +A 65% PCB sold via TaoBao, commonly sold as part of the Canoe clone referred to as Fanoe. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: Wheatfield Blocked65% +* Hardware Availability: [taobao.com](https://item.taobao.com/item.htm?id=570827341563&spm=1101.1101.N.N.b124829) + +Make example for this keyboard (after setting up your build environment): + + make wheatfield/blocked65: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/wheatfield/blocked65/rules.mk b/keyboards/wheatfield/blocked65/rules.mk new file mode 100644 index 0000000000..b572f2e41e --- /dev/null +++ b/keyboards/wheatfield/blocked65/rules.mk @@ -0,0 +1,35 @@ +# 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 = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # 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 = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI controls +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 +UNICODE_ENABLE = no # Unicode + +LAYOUTS = 65_ansi_blocker diff --git a/lib/python/qmk/cli/json/keymap.py b/lib/python/qmk/cli/json/keymap.py index 6e25b7862b..c97a2d0462 100755 --- a/lib/python/qmk/cli/json/keymap.py +++ b/lib/python/qmk/cli/json/keymap.py @@ -8,7 +8,7 @@ from milc import cli @cli.argument('-o', '--output', arg_only=True, type=Path, help='File to write to') @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") @cli.argument('filename', arg_only=True, help='Configurator JSON file') -@cli.subcommand('Creates a keymap.c from a QMK Configurator export.') +@cli.subcommand('Creates a keymap.c from a QMK Configurator export.', hidden=True) def json_keymap(cli): """Renamed to `qmk json2c`. """ diff --git a/quantum/keymap_extras/keymap_dvp.h b/quantum/keymap_extras/keymap_dvp.h index 4b60a67d4d..99c69a4af5 100644 --- a/quantum/keymap_extras/keymap_dvp.h +++ b/quantum/keymap_extras/keymap_dvp.h @@ -14,85 +14,112 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef KEYMAP_DVP_H -#define KEYMAP_DVP_H +#pragma once #include "keymap.h" -// Normal characters -#define DP_DLR KC_GRV -#define DP_AMPR KC_1 -#define DP_LBRC KC_2 -#define DP_LCBR KC_3 -#define DP_RCBR KC_4 -#define DP_LPRN KC_5 -#define DP_EQL KC_6 -#define DP_ASTR KC_7 -#define DP_RPRN KC_8 -#define DP_PLUS KC_9 -#define DP_RBRC KC_0 -#define DP_EXLM KC_MINS -#define DP_HASH KC_EQL +// clang-format off -#define DP_SCLN KC_Q -#define DP_COMM KC_W -#define DP_DOT KC_E -#define DP_P KC_R -#define DP_Y KC_T -#define DP_F KC_Y -#define DP_G KC_U -#define DP_C KC_I -#define DP_R KC_O -#define DP_L KC_P -#define DP_SLSH KC_LBRC -#define DP_AT KC_RBRC -#define DP_BSLS KC_BSLS - -#define DP_A KC_A -#define DP_O KC_S -#define DP_E KC_D -#define DP_U KC_F -#define DP_I KC_G -#define DP_D KC_H -#define DP_H KC_J -#define DP_T KC_K -#define DP_N KC_L -#define DP_S KC_SCLN -#define DP_MINS KC_QUOT - -#define DP_QUOT KC_Z -#define DP_Q KC_X -#define DP_J KC_C -#define DP_K KC_V -#define DP_X KC_B -#define DP_B KC_N -#define DP_M KC_M -#define DP_W KC_COMM -#define DP_V KC_DOT -#define DP_Z KC_SLSH - -// Shifted characters -#define DP_TILD LSFT(DP_DLR) -#define DP_PERC LSFT(DP_AMPR) -#define DP_7 LSFT(DP_LBRC) -#define DP_5 LSFT(DP_LCBR) -#define DP_3 LSFT(DP_RCBR) -#define DP_1 LSFT(DP_LPRN) -#define DP_9 LSFT(DP_EQL) -#define DP_0 LSFT(DP_ASTR) -#define DP_2 LSFT(DP_RPRN) -#define DP_4 LSFT(DP_PLUS) -#define DP_6 LSFT(DP_RBRC) -#define DP_8 LSFT(DP_EXLM) -#define DP_GRV LSFT(DP_HASH) - -#define DP_COLN LSFT(DP_SCLN) -#define DP_LABK LSFT(DP_COMM) -#define DP_RABK LSFT(DP_DOT) -#define DP_QUES LSFT(DP_SLSH) -#define DP_CIRC LSFT(DP_AT) -#define DP_PIPE LSFT(DP_BSLS) -#define DP_UNDS LSFT(DP_MINS) -#define DP_DQUO LSFT(DP_QUOT) +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ $ │ & │ [ │ { │ } │ ( │ = │ * │ ) │ + │ ] │ ! │ # │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ ; │ , │ . │ P │ Y │ F │ G │ C │ R │ L │ / │ @ │ \ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ - │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │ │ ' │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define DP_DLR KC_GRV // $ +#define DP_AMPR KC_1 // & +#define DP_LBRC KC_2 // [ +#define DP_LCBR KC_3 // { +#define DP_RCBR KC_4 // } +#define DP_LPRN KC_5 // ( +#define DP_EQL KC_6 // = +#define DP_ASTR KC_7 // * +#define DP_RPRN KC_8 // ) +#define DP_PLUS KC_9 // + +#define DP_RBRC KC_0 // ] +#define DP_EXLM KC_MINS // ! +#define DP_HASH KC_EQL // # +// Row 2 +#define DP_SCLN KC_Q // ; +#define DP_COMM KC_W // , +#define DP_DOT KC_E // . +#define DP_P KC_R // P +#define DP_Y KC_T // Y +#define DP_F KC_Y // F +#define DP_G KC_U // G +#define DP_C KC_I // C +#define DP_R KC_O // R +#define DP_L KC_P // L +#define DP_SLSH KC_LBRC // / +#define DP_AT KC_RBRC // @ +#define DP_BSLS KC_BSLS // (backslash) +// Row 3 +#define DP_A KC_A // A +#define DP_O KC_S // O +#define DP_E KC_D // E +#define DP_U KC_F // U +#define DP_I KC_G // I +#define DP_D KC_H // D +#define DP_H KC_J // H +#define DP_T KC_K // T +#define DP_N KC_L // N +#define DP_S KC_SCLN // S +#define DP_MINS KC_QUOT // - +// Row 4 +#define DP_QUOT KC_Z // ' +#define DP_Q KC_X // Q +#define DP_J KC_C // J +#define DP_K KC_V // K +#define DP_X KC_B // X +#define DP_B KC_N // B +#define DP_M KC_M // M +#define DP_W KC_COMM // W +#define DP_V KC_DOT // V +#define DP_Z KC_SLSH // Z -#endif +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ~ │ % │ 7 │ 5 │ 3 │ 1 │ 9 │ 0 │ 2 │ 4 │ 6 │ 8 │ ` │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ : │ < │ > │ │ │ │ │ │ │ │ ? │ ^ │ | │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ _ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │ │ " │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define DP_TILD S(DP_DLR) // ~ +#define DP_PERC S(DP_AMPR) // % +#define DP_7 S(DP_LBRC) // 7 +#define DP_5 S(DP_LCBR) // 5 +#define DP_3 S(DP_RCBR) // 3 +#define DP_1 S(DP_LPRN) // 1 +#define DP_9 S(DP_EQL) // 9 +#define DP_0 S(DP_ASTR) // 0 +#define DP_2 S(DP_RPRN) // 2 +#define DP_4 S(DP_PLUS) // 4 +#define DP_6 S(DP_RBRC) // 6 +#define DP_8 S(DP_EXLM) // 8 +#define DP_GRV S(DP_HASH) // ` +// Row 2 +#define DP_COLN S(DP_SCLN) // : +#define DP_LABK S(DP_COMM) // < +#define DP_RABK S(DP_DOT) // > +#define DP_QUES S(DP_SLSH) // ? +#define DP_CIRC S(DP_AT) // ^ +#define DP_PIPE S(DP_BSLS) // | +// Row 3 +#define DP_UNDS S(DP_MINS) // _ +// Row 4 +#define DP_DQUO S(DP_QUOT) // " diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h index d4329e547d..589fb4ea18 100644 --- a/quantum/keymap_extras/keymap_uk.h +++ b/quantum/keymap_extras/keymap_uk.h @@ -13,165 +13,214 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef KEYMAP_UK_H -#define KEYMAP_UK_H -#include "keymap.h" - -// Normal characters -#define UK_HASH KC_NUHS -#define UK_BSLS KC_NUBS - -// Shifted characters -#define UK_NOT LSFT(KC_GRV) -#define UK_DQUO LSFT(KC_2) -#define UK_PND LSFT(KC_3) -#define UK_AT LSFT(KC_QUOT) -#define UK_TILD LSFT(KC_NUHS) -#define UK_PIPE LSFT(KC_NUBS) +#pragma once -// Alt Gr-ed characters -#define UK_BRKP ALGR(KC_GRV) -#define UK_EURO ALGR(KC_4) -#define UK_EACT ALGR(KC_E) -#define UK_UACT ALGR(KC_U) -#define UK_IACT ALGR(KC_I) -#define UK_OACT ALGR(KC_O) -#define UK_AACT ALGR(KC_A) - -// Duplicate US keyboard so that we don't have to use it -#define UK_A KC_A -#define UK_B KC_B -#define UK_C KC_C -#define UK_D KC_D -#define UK_E KC_E -#define UK_F KC_F -#define UK_G KC_G -#define UK_H KC_H -#define UK_I KC_I -#define UK_J KC_J -#define UK_K KC_K -#define UK_L KC_L -#define UK_M KC_M -#define UK_N KC_N -#define UK_O KC_O -#define UK_P KC_P -#define UK_Q KC_Q -#define UK_R KC_R -#define UK_S KC_S -#define UK_T KC_T -#define UK_U KC_U -#define UK_V KC_V -#define UK_W KC_W -#define UK_X KC_X -#define UK_Y KC_Y -#define UK_Z KC_Z +#include "keymap.h" -#define UK_1 KC_1 -#define UK_2 KC_2 -#define UK_3 KC_3 -#define UK_4 KC_4 -#define UK_5 KC_5 -#define UK_6 KC_6 -#define UK_7 KC_7 -#define UK_8 KC_8 -#define UK_9 KC_9 -#define UK_0 KC_0 +// clang-format off -#define UK_F1 KC_F1 -#define UK_F2 KC_F2 -#define UK_F3 KC_F3 -#define UK_F4 KC_F4 -#define UK_F5 KC_F5 -#define UK_F6 KC_F6 -#define UK_F7 KC_F7 -#define UK_F8 KC_F8 -#define UK_F9 KC_F9 -#define UK_F10 KC_F10 -#define UK_F11 KC_F11 -#define UK_F12 KC_F12 -#define UK_F13 KC_F13 -#define UK_F14 KC_F14 -#define UK_F15 KC_F15 -#define UK_F16 KC_F16 -#define UK_F17 KC_F17 -#define UK_F18 KC_F18 -#define UK_F19 KC_F19 -#define UK_F20 KC_F20 -#define UK_F21 KC_F21 -#define UK_F22 KC_F22 -#define UK_F23 KC_F23 -#define UK_F24 KC_F24 +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define UK_GRV KC_GRV // ` +#define UK_1 KC_1 // 1 +#define UK_2 KC_2 // 2 +#define UK_3 KC_3 // 3 +#define UK_4 KC_4 // 4 +#define UK_5 KC_5 // 5 +#define UK_6 KC_6 // 6 +#define UK_7 KC_7 // 7 +#define UK_8 KC_8 // 8 +#define UK_9 KC_9 // 9 +#define UK_0 KC_0 // 0 +#define UK_MINS KC_MINS // - +#define UK_EQL KC_EQL // = +// Row 2 +#define UK_Q KC_Q // Q +#define UK_W KC_W // W +#define UK_E KC_E // E +#define UK_R KC_R // R +#define UK_T KC_T // T +#define UK_Y KC_Y // Y +#define UK_U KC_U // U +#define UK_I KC_I // I +#define UK_O KC_O // O +#define UK_P KC_P // P +#define UK_LBRC KC_LBRC // [ +#define UK_RBRC KC_RBRC // ] +// Row 3 +#define UK_A KC_A // A +#define UK_S KC_S // S +#define UK_D KC_D // D +#define UK_F KC_F // F +#define UK_G KC_G // G +#define UK_H KC_H // H +#define UK_J KC_J // J +#define UK_K KC_K // K +#define UK_L KC_L // L +#define UK_SCLN KC_SCLN // ; +#define UK_QUOT KC_QUOT // ' +#define UK_HASH KC_NUHS // # +// Row 4 +#define UK_BSLS KC_NUBS // (backslash) +#define UK_Z KC_Z // Z +#define UK_X KC_X // X +#define UK_C KC_C // C +#define UK_V KC_V // V +#define UK_B KC_B // B +#define UK_N KC_N // N +#define UK_M KC_M // M +#define UK_COMM KC_COMM // , +#define UK_DOT KC_DOT // . +#define UK_SLSH KC_SLSH // / -#define UK_SCLN KC_SCLN -#define UK_COMM KC_COMM -#define UK_DOT KC_DOT -#define UK_SLSH KC_SLSH -#define UK_EXLM KC_EXLM -#define UK_UNDS KC_UNDS -#define UK_MINS KC_MINS -#define UK_LCBR KC_LCBR -#define UK_RCBR KC_RCBR -#define UK_DLR KC_DLR -#define UK_PERC KC_PERC -#define UK_PLUS KC_PLUS -#define UK_EQL KC_EQL -#define UK_LPRN KC_LPRN -#define UK_RPRN KC_RPRN -#define UK_CIRC KC_CIRC -#define UK_AMPR KC_AMPR -#define UK_LABK KC_LABK -#define UK_LBRC KC_LBRC -#define UK_RBRC KC_RBRC -#define UK_RABK KC_RABK -#define UK_GRV KC_GRV -#define UK_ASTR KC_ASTR -#define UK_QUOT KC_QUOT +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ¬ │ ! │ " │ £ │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ │ │ │ │ │ │ │ │ │ : │ @ │ ~ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ | │ │ │ │ │ │ │ │ < │ > │ ? │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define UK_NOT S(UK_GRV) // ¬ +#define UK_EXLM S(UK_1) // ! +#define UK_DQUO S(UK_2) // " +#define UK_PND S(UK_3) // £ +#define UK_DLR S(UK_4) // $ +#define UK_PERC S(UK_5) // % +#define UK_CIRC S(UK_6) // ^ +#define UK_AMPR S(UK_7) // & +#define UK_ASTR S(UK_8) // * +#define UK_LPRN S(UK_9) // ( +#define UK_RPRN S(UK_0) // ) +#define UK_UNDS S(UK_MINS) // _ +#define UK_PLUS S(UK_EQL) // + +// Row 2 +#define UK_LCBR S(UK_LBRC) // { +#define UK_RCBR S(UK_RBRC) // } +// Row 3 +#define UK_COLN S(UK_SCLN) // : +#define UK_AT S(UK_QUOT) // @ +#define UK_TILD S(UK_HASH) // ~ +// Row 4 +#define UK_PIPE S(UK_BSLS) // | +#define UK_LABK S(UK_COMM) // < +#define UK_RABK S(UK_DOT) // > +#define UK_QUES S(UK_SLSH) // ? -#define UK_P1 KC_P1 -#define UK_P2 KC_P2 -#define UK_P3 KC_P3 -#define UK_P4 KC_P4 -#define UK_P5 KC_P5 -#define UK_P6 KC_P6 -#define UK_P7 KC_P7 -#define UK_P8 KC_P8 -#define UK_P9 KC_P9 -#define UK_P0 KC_P0 -#define UK_PDOT KC_PDOT -#define UK_PCMM KC_PCMM -#define UK_PSLS KC_PSLS -#define UK_PAST KC_PAST -#define UK_PMNS KC_PMNS -#define UK_PPLS KC_PPLS -#define UK_PEQL KC_PEQL -#define UK_PENT KC_PENT +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ¦ │ │ │ │ € │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ │ │ É │ │ │ │ Ú │ Í │ Ó │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ Á │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define UK_BRKP ALGR(UK_GRV) // ¦ +#define UK_EURO ALGR(UK_4) // € +// Row 2 +#define UK_EACU ALGR(KC_E) // É +#define UK_UACU ALGR(KC_U) // Ú +#define UK_IACU ALGR(KC_I) // Í +#define UK_OACU ALGR(KC_O) // Ó +// Row 3 +#define UK_AACU ALGR(KC_A) // Á -#define UK_TAB KC_TAB -#define UK_ENT KC_ENT +// DEPRECATED +#define UK_ESC KC_ESC +#define UK_F1 KC_F1 +#define UK_F2 KC_F2 +#define UK_F3 KC_F3 +#define UK_F4 KC_F4 +#define UK_F5 KC_F5 +#define UK_F6 KC_F6 +#define UK_F7 KC_F7 +#define UK_F8 KC_F8 +#define UK_F9 KC_F9 +#define UK_F10 KC_F10 +#define UK_F11 KC_F11 +#define UK_F12 KC_F12 +#define UK_PSCR KC_PSCR +#define UK_SLCK KC_SLCK +#define UK_PAUS KC_PAUS +#define UK_BSPC KC_BSPC +#define UK_TAB KC_TAB +#define UK_ENT KC_ENT #define UK_LSFT KC_LSFT +#define UK_RSFT KC_RSFT #define UK_LCTL KC_LCTL -#define UK_LALT KC_LALT #define UK_LGUI KC_LGUI -#define UK_SPC KC_SPC -#define UK_DEL KC_DEL -#define UK_BSPC KC_BSPC -#define UK_RSFT KC_RSFT -#define UK_RCTL KC_RCTL +#define UK_LALT KC_LALT +#define UK_SPC KC_SPC #define UK_RALT KC_RALT #define UK_RGUI KC_RGUI -#define UK_ESC KC_ESC -#define UK_PSCR KC_PSCR -#define UK_SLCK KC_SLCK -#define UK_PAUS KC_PAUS -#define UK_INS KC_INS +#define UK_RCTL KC_RCTL +#define UK_INS KC_INS +#define UK_DEL KC_DEL #define UK_HOME KC_HOME +#define UK_END KC_END #define UK_PGUP KC_PGUP -#define UK_END KC_END #define UK_PGDN KC_PGDN +#define UK_UP KC_UP #define UK_LEFT KC_LEFT -#define UK_RGHT KC_RGHT -#define UK_UP KC_UP #define UK_DOWN KC_DOWN - -#endif +#define UK_RGHT KC_RGHT +#define UK_PSLS KC_PSLS +#define UK_PAST KC_PAST +#define UK_PMNS KC_PMNS +#define UK_PPLS KC_PPLS +#define UK_PENT KC_PENT +#define UK_P1 KC_P1 +#define UK_P2 KC_P2 +#define UK_P3 KC_P3 +#define UK_P4 KC_P4 +#define UK_P5 KC_P5 +#define UK_P6 KC_P6 +#define UK_P7 KC_P7 +#define UK_P8 KC_P8 +#define UK_P9 KC_P9 +#define UK_P0 KC_P0 +#define UK_PDOT KC_PDOT +#define UK_PEQL KC_PEQL +#define UK_PCMM KC_PCMM +#define UK_F13 KC_F13 +#define UK_F14 KC_F14 +#define UK_F15 KC_F15 +#define UK_F16 KC_F16 +#define UK_F17 KC_F17 +#define UK_F18 KC_F18 +#define UK_F19 KC_F19 +#define UK_F20 KC_F20 +#define UK_F21 KC_F21 +#define UK_F22 KC_F22 +#define UK_F23 KC_F23 +#define UK_F24 KC_F24 +#define UK_EACT UK_EACU +#define UK_UACT UK_UACU +#define UK_IACT UK_IACU +#define UK_OACT UK_OACU +#define UK_AACT UK_OACU diff --git a/quantum/keymap_extras/sendstring_dvp.h b/quantum/keymap_extras/sendstring_dvp.h new file mode 100644 index 0000000000..74b595524d --- /dev/null +++ b/quantum/keymap_extras/sendstring_dvp.h @@ -0,0 +1,80 @@ +/* Copyright 2020 + * + * 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 <http://www.gnu.org/licenses/>. + */ + +// Sendstring lookup tables for Programmer Dvorak layouts + +#pragma once + +#include "keymap_dvp.h" +#include "quantum.h" + +// clang-format off + +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 1, 0, 0, 1, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 1, 0, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 1, 0) +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, DP_EXLM, DP_QUOT, DP_HASH, DP_DLR, DP_AMPR, DP_AMPR, DP_QUOT, + // ( ) * + , - . / + DP_LPRN, DP_RPRN, DP_ASTR, DP_PLUS, DP_COMM, DP_MINS, DP_DOT, DP_SLSH, + // 0 1 2 3 4 5 6 7 + DP_ASTR, DP_LPRN, DP_RPRN, DP_RCBR, DP_PLUS, DP_LCBR, DP_RBRC, DP_LBRC, + // 8 9 : ; < = > ? + DP_EXLM, DP_EQL, DP_SCLN, DP_SCLN, DP_COMM, DP_EQL, DP_DOT, DP_SLSH, + // @ A B C D E F G + DP_AT, DP_A, DP_B, DP_C, DP_D, DP_E, DP_F, DP_G, + // H I J K L M N O + DP_H, DP_I, DP_J, DP_K, DP_L, DP_M, DP_N, DP_O, + // P Q R S T U V W + DP_P, DP_Q, DP_R, DP_S, DP_T, DP_U, DP_V, DP_W, + // X Y Z [ \ ] ^ _ + DP_X, DP_Y, DP_Z, DP_LBRC, DP_BSLS, DP_RBRC, DP_AT, DP_MINS, + // ` a b c d e f g + DP_HASH, DP_A, DP_B, DP_C, DP_D, DP_E, DP_F, DP_G, + // h i j k l m n o + DP_H, DP_I, DP_J, DP_K, DP_L, DP_M, DP_N, DP_O, + // p q r s t u v w + DP_P, DP_Q, DP_R, DP_S, DP_T, DP_U, DP_V, DP_W, + // x y z { | } ~ DEL + DP_X, DP_Y, DP_Z, DP_LCBR, DP_BSLS, DP_RCBR, DP_DLR, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_uk.h b/quantum/keymap_extras/sendstring_uk.h index 733c5f8600..bbd30769b0 100644 --- a/quantum/keymap_extras/sendstring_uk.h +++ b/quantum/keymap_extras/sendstring_uk.h @@ -40,7 +40,7 @@ const uint8_t ascii_to_shift_lut[16] PROGMEM = { KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), - KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0) }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { @@ -54,7 +54,7 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = { XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - UK_SPC, UK_1, UK_2, UK_HASH, UK_4, UK_5, UK_7, UK_QUOT, + KC_SPC, UK_1, UK_2, UK_HASH, UK_4, UK_5, UK_7, UK_QUOT, // ( ) * + , - . / UK_9, UK_0, UK_8, UK_EQL, UK_COMM, UK_MINS, UK_DOT, UK_SLSH, // 0 1 2 3 4 5 6 7 diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 1525391a45..2c65a34aa3 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -98,30 +98,6 @@ ifndef TEENSY_LOADER_CLI endif endif -# Generate a .qmk for the QMK-FF -qmk: $(BUILD_DIR)/$(TARGET).hex - zip $(TARGET).qmk -FSrj $(KEYMAP_PATH)/* - zip $(TARGET).qmk -u $< - printf "@ $<\n@=firmware.hex\n" | zipnote -w $(TARGET).qmk - printf "{\n \"generated\": \"%s\"\n}" "$$(date)" > $(BUILD_DIR)/$(TARGET).json - if [ -f $(KEYBOARD_PATH_5)/info.json ]; then \ - jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_5)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \ - fi - if [ -f $(KEYBOARD_PATH_4)/info.json ]; then \ - jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_4)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \ - fi - if [ -f $(KEYBOARD_PATH_3)/info.json ]; then \ - jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_3)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \ - fi - if [ -f $(KEYBOARD_PATH_2)/info.json ]; then \ - jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_2)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \ - fi - if [ -f $(KEYBOARD_PATH_1)/info.json ]; then \ - jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_1)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \ - fi - zip $(TARGET).qmk -urj $(BUILD_DIR)/$(TARGET).json - printf "@ $(TARGET).json\n@=info.json\n" | zipnote -w $(TARGET).qmk - # Program the device. program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep check-size $(PROGRAM_CMD) diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 577603080b..014019ef04 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -244,30 +244,6 @@ EXTRALIBDIRS = $(RULESPATH)/ld DFU_UTIL ?= dfu-util ST_LINK_CLI ?= st-link_cli -# Generate a .qmk for the QMK-FF -qmk: $(BUILD_DIR)/$(TARGET).bin - zip $(TARGET).qmk -FSrj $(KEYMAP_PATH)/* - zip $(TARGET).qmk -u $< - printf "@ $<\n@=firmware.bin\n" | zipnote -w $(TARGET).qmk - printf "{\n \"generated\": \"%s\"\n}" "$$(date)" > $(BUILD_DIR)/$(TARGET).json - if [ -f $(KEYBOARD_PATH_5)/info.json ]; then \ - jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_5)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \ - fi - if [ -f $(KEYBOARD_PATH_4)/info.json ]; then \ - jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_4)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \ - fi - if [ -f $(KEYBOARD_PATH_3)/info.json ]; then \ - jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_3)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \ - fi - if [ -f $(KEYBOARD_PATH_2)/info.json ]; then \ - jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_2)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \ - fi - if [ -f $(KEYBOARD_PATH_1)/info.json ]; then \ - jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_1)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \ - fi - zip $(TARGET).qmk -urj $(BUILD_DIR)/$(TARGET).json - printf "@ $(TARGET).json\n@=info.json\n" | zipnote -w $(TARGET).qmk - define EXEC_DFU_UTIL until $(DFU_UTIL) -l | grep -q "Found DFU"; do\ printf "$(MSG_BOOTLOADER_NOT_FOUND)" ;\ diff --git a/users/alfrdmalr/alfrdmalr.h b/users/alfrdmalr/alfrdmalr.h index 1989fb11a0..c779a353d9 100644 --- a/users/alfrdmalr/alfrdmalr.h +++ b/users/alfrdmalr/alfrdmalr.h @@ -164,11 +164,11 @@ enum alfrdmalr_keycodes { * ,-----------------------------------------------------------------------------------. * | TRNS | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | TRNS | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | ! | @ | { | } | | | ^ | $ | & | | | DEL | + * | TRNS | ! | # | { | } | | | ^ | $ | & | | | DEL | * |------+------+------+------+------+------+------+------+------+------+------+------| * | TRNS | < | > | ( | ) | | | - | + | = | \ | ` | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | ~ | # | [ | ] | | | _ | * | % | / | TRNS | + * | TRNS | ~ | @ | [ | ] | | | _ | * | % | / | TRNS | * |------+------+------+------+------+------+------+------+------+------+------+------| * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | * `-----------------------------------------------------------------------------------' @@ -176,9 +176,9 @@ enum alfrdmalr_keycodes { // LEFT // - CORE -#define ____SYMBOL_L1____ KC_EXCLAIM, KC_AT, KC_LCBR, KC_RCBR, KC_NO +#define ____SYMBOL_L1____ KC_EXCLAIM, KC_HASH, KC_LCBR, KC_RCBR, KC_NO #define ____SYMBOL_L2____ KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_NO -#define ____SYMBOL_L3____ KC_TILD, KC_HASH, KC_LBRC, KC_RBRC, KC_NO +#define ____SYMBOL_L3____ KC_TILD, KC_AT, KC_LBRC, KC_RBRC, KC_NO // - MODS #define ____SYMBOL_L4____ ______TRANS______ |