Compare commits

...
4 Commits
Author SHA1 Message Date
skullydazed cf40c33c90 Add gcc version detection to qmk doctor (#8338) 2020-03-08 09:21:45 -07:00
Samuel Li 4b7a3b2265 [Keyboard] New Keyboard: handwired/jtallbean/split_65 (#8275)
* New keyboard: split_65

* Updated readme

* Update with requested changes

* Add writePinLow to prevent flickering

* Renamed LAYOUT to LAYOUT_all
2020-03-08 00:26:26 -08:00
Ryan 829906969c Update Norwegian keymap and add sendstring LUT (#8300) 2020-03-08 15:43:05 +11:00
yulei e0d15e6182 fixed #8259 (#8333) 2020-03-07 13:19:06 +00:00
19 changed files with 894 additions and 109 deletions

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
# jtallbean
QMK folders for relevant boards:
split_65
@@ -0,0 +1,255 @@
/*
Copyright 2020 jtallbean
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 0x0000
#define DEVICE_VER 0x0001
#define MANUFACTURER jtallbean
#define PRODUCT split_65
#define DESCRIPTION Split ergonomic keyboard
/* key matrix size */
#define MATRIX_ROWS 10 // Double rows for split keyboards. split_65 has 5, so define 10
#define MATRIX_COLS 9
/*
* 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 { F4, F1, F0, C7, B6 }
#define MATRIX_COL_PINS { C6, B5, B4, D7, D6, D4, D2, D3, B7 } // B7 is not actually used, but it is needed since # of entries must equal 9
#define MATRIX_ROW_PINS_RIGHT { E6, F0, F1, F7, D7 }
#define MATRIX_COL_PINS_RIGHT { B4, B5, B6, C6, C7, D4, D6, D3, D2 }
#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 SPLIT_HAND_PIN D5
// #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
@@ -0,0 +1,88 @@
{
"keyboard_name": "split_65",
"url": "",
"maintainer": "jtallbean",
"width": 18.25,
"height": 5,
"layouts": {
"LAYOUT_all": {
"layout": [
{"x":0, "y":0},
{"label":"Esc", "x":1.25, "y":0},
{"label":"!", "x":2.25, "y":0},
{"label":"@", "x":3.25, "y":0},
{"label":"#", "x":4.25, "y":0},
{"label":"$", "x":5.25, "y":0},
{"label":"%", "x":6.25, "y":0},
{"label":"^", "x":7.25, "y":0},
{"label":"&", "x":9.25, "y":0},
{"label":"*", "x":10.25, "y":0},
{"label":"(", "x":11.25, "y":0},
{"label":")", "x":12.25, "y":0},
{"label":"_", "x":13.25, "y":0},
{"label":"+", "x":14.25, "y":0},
{"label":"~", "x":15.25, "y":0},
{"label":"Back", "x":16.25, "y":0},
{"label":"Insert", "x":17.25, "y":0},
{"label":"PgUp", "x":0, "y":1},
{"label":"Tab", "x":1.25, "y":1, "w":1.5},
{"label":"Q", "x":2.75, "y":1},
{"label":"W", "x":3.75, "y":1},
{"label":"E", "x":4.75, "y":1},
{"label":"R", "x":5.75, "y":1},
{"label":"T", "x":6.75, "y":1},
{"label":"Y", "x":8.75, "y":1},
{"label":"U", "x":9.75, "y":1},
{"label":"I", "x":10.75, "y":1},
{"label":"O", "x":11.75, "y":1},
{"label":"P", "x":12.75, "y":1},
{"label":"{", "x":13.75, "y":1},
{"label":"}", "x":14.75, "y":1},
{"label":"|", "x":15.75, "y":1, "w":1.5},
{"label":"Delete", "x":17.25, "y":1},
{"label":"PgDn", "x":0, "y":2},
{"label":"Caps Lock", "x":1.25, "y":2, "w":1.75},
{"label":"A", "x":3, "y":2},
{"label":"S", "x":4, "y":2},
{"label":"D", "x":5, "y":2},
{"label":"F", "x":6, "y":2},
{"label":"G", "x":7, "y":2},
{"label":"H", "x":9, "y":2},
{"label":"J", "x":10, "y":2},
{"label":"K", "x":11, "y":2},
{"label":"L", "x":12, "y":2},
{"label":":", "x":13, "y":2},
{"label":"\"", "x":14, "y":2},
{"label":"Enter", "x":15, "y":2, "w":2.25},
{"label":"Home", "x":17.25, "y":2},
{"label":"Fn", "x":0, "y":3},
{"label":"Shift", "x":1.25, "y":3, "w":2.25},
{"label":"Z", "x":3.5, "y":3},
{"label":"X", "x":4.5, "y":3},
{"label":"C", "x":5.5, "y":3},
{"label":"V", "x":6.5, "y":3},
{"label":"B", "x":7.5, "y":3},
{"label":"N", "x":9.5, "y":3},
{"label":"M", "x":10.5, "y":3},
{"label":"<", "x":11.5, "y":3},
{"label":">", "x":12.5, "y":3},
{"label":"?", "x":13.5, "y":3},
{"label":"Shift", "x":14.5, "y":3, "w":1.75},
{"label":"\u2191", "x":16.25, "y":3},
{"label":"End", "x":17.25, "y":3},
{"label":"Code", "x":0, "y":4},
{"label":"Ctrl", "x":1.25, "y":4, "w":1.25},
{"label":"Win", "x":2.5, "y":4, "w":1.25},
{"label":"Alt", "x":3.75, "y":4, "w":1.25},
{"x":5, "y":4, "w":2.75},
{"x":8.75, "y":4, "w":2.25},
{"label":"Alt", "x":11, "y":4, "w":1.25},
{"label":"Win", "x":12.25, "y":4, "w":1.25},
{"label":"Ctrl", "x":13.5, "y":4, "w":1.25},
{"label":"\u2190", "x":15.25, "y":4},
{"label":"\u2193", "x":16.25, "y":4},
{"label":"\u2192", "x":17.25, "y":4}
]
}
}
}
@@ -0,0 +1,50 @@
/* Copyright 2020 jtallbean
*
* 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,
_DN,
_UP
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT_all(
KC_NO, 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_GRV, KC_BSPC, KC_INS,
KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
KC_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_HOME,
MO(_UP), 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_END,
MO(_DN), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Down */
[_DN] = 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_MUTE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* Up */
[_UP] = LAYOUT_all(
_______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, _______, KC_MPLY,
_______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, KC_MNXT,
_______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, KC_MPRV,
_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, _______, _______, _______, _______, _______, KC_MSTP,
_______, _______, _______, _______, _______, KC_P0, _______, _______, _______, _______, _______, _______
),
};
@@ -0,0 +1,5 @@
![split_65 layout image](https://i.imgur.com/LwyZlQo.png)
# The default keymap for split_65
This is the default layout that comes flashed on the split_65
@@ -0,0 +1,15 @@
# split_65
![split_65](https://i.imgur.com/hUTqwmv.png)
split_65 is a split, 65% layout keyboard with left function column designed for improved ergonomics and comfort.
* Keyboard Maintainer: [jtallbean](https://github.com/samlli)
* Hardware Supported: split_65
* Hardware Availability: N/A
Make example for this keyboard (after setting up your build environment):
make handwired/jtallbean/split_65: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).
@@ -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 = 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
SPLIT_KEYBOARD = yes # Enable split keyboard support
@@ -0,0 +1,43 @@
/* Copyright 2020 jtallbean
*
* 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 "split_65.h"
// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
// Set our LED pins as output
setPinOutput(B0);
writePinLow(B0);
matrix_init_user();
}
bool led_update_kb(led_t led_state) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
bool res = led_update_user(led_state);
if(res) {
// writePin sets the pin high for 1 and low for 0.
writePin(B0, led_state.caps_lock);
}
return res;
}
@@ -0,0 +1,47 @@
/* Copyright 2020 jtallbean
*
* 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.
*/
#define LAYOUT_all( \
L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, R08, \
L10, L11, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, R18, \
L20, L21, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R27, R28, \
L30, L31, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R37, R38, \
L40, L41, L43, L44, L45, R40, R42, R43, R44, R45, R47, R48 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, L06, L07, KC_NO}, \
{ L10, L11, KC_NO, L13, L14, L15, L16, L17, KC_NO}, \
{ L20, L21, KC_NO, L23, L24, L25, L26, L27, KC_NO}, \
{ L30, L31, KC_NO, L33, L34, L35, L36, L37, KC_NO}, \
{ L40, L41, KC_NO, L43, L44, L45, KC_NO, KC_NO, KC_NO}, \
{ R00, R01, R02, R03, R04, R05, R06, R07, R08 }, \
{ R10, R11, R12, R13, R14, R15, R16, R17, R18 }, \
{ R20, R21, R22, R23, R24, R25, KC_NO, R27, R28 }, \
{ R30, R31, R32, R33, R34, R35, KC_NO, R37, R38 }, \
{ R40, KC_NO, R42, R43, R44, R45, KC_NO, R47, R48 } \
}
@@ -3,3 +3,7 @@ BOARDSRC = $(BOARD_PATH)/boards/noah_bd/board.c
# Required include directories # Required include directories
BOARDINC = $(BOARD_PATH)/boards/noah_bd BOARDINC = $(BOARD_PATH)/boards/noah_bd
# Shared variables
ALLCSRC += $(BOARDSRC)
ALLINC += $(BOARDINC)
+9 -7
View File
@@ -17,8 +17,12 @@
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5
#define MATRIX_COLS 15 #define MATRIX_COLS 15
#define MATRIX_ROW_PINS { B0, A1, C14, C13, A0}
#define MATRIX_COL_PINS { C15, B10, B7, B6, B5, B4, A15, A10, A9, A8, B15, B14, B13, B12, B2}
#define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
// i2c setting // i2c setting
#define USE_I2CV1 #define USE_I2CV1
@@ -37,13 +41,11 @@
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
/* indicator rgb */ /* indicator rgb */
#define WS2812_LED_N 7 #define RGBLED_NUM 7
#define RGBLED_NUM WS2812_LED_N
#define RGB_DI_PIN B1 #define RGB_DI_PIN B1
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
//#define WS2812_EXTERNAL_PULLUP
// tapping setting // tapping setting
#define TAPPING_TERM 200 //#define TAPPING_TERM 200
#define RETRO_TAPPING //#define RETRO_TAPPING
#define PERMISSIVE_HOLD //#define PERMISSIVE_HOLD
+2 -2
View File
@@ -72,7 +72,7 @@
* @brief Enables the GPT subsystem. * @brief Enables the GPT subsystem.
*/ */
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
#define HAL_USE_GPT TRUE #define HAL_USE_GPT FALSE
#endif #endif
/** /**
@@ -114,7 +114,7 @@
* @brief Enables the PWM subsystem. * @brief Enables the PWM subsystem.
*/ */
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
#define HAL_USE_PWM TRUE #define HAL_USE_PWM FALSE
#endif #endif
/** /**
+1 -1
View File
@@ -130,7 +130,7 @@ uint8_t matrix_scan(void)
} }
} }
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCING_DELAY) { if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
for (int row = 0; row < MATRIX_ROWS; row++) { for (int row = 0; row < MATRIX_ROWS; row++) {
matrix[row] = 0; matrix[row] = 0;
for (int col = 0; col < MATRIX_COLS; col++) { for (int col = 0; col < MATRIX_COLS; col++) {
+23 -38
View File
@@ -1,5 +1,5 @@
/* /*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -57,13 +57,31 @@
#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 #define STM32_MCO1PRE STM32_MCO1PRE_DIV1
#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK #define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK
#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 #define STM32_MCO2PRE STM32_MCO2PRE_DIV5
#define STM32_I2SSRC STM32_I2SSRC_PLLI2S #define STM32_I2SSRC STM32_I2SSRC_CKIN
#define STM32_PLLI2SN_VALUE 192 #define STM32_PLLI2SN_VALUE 192
#define STM32_PLLI2SR_VALUE 2 #define STM32_PLLI2SR_VALUE 5
#define STM32_PVD_ENABLE FALSE #define STM32_PVD_ENABLE FALSE
#define STM32_PLS STM32_PLS_LEV0 #define STM32_PLS STM32_PLS_LEV0
#define STM32_BKPRAM_ENABLE FALSE #define STM32_BKPRAM_ENABLE FALSE
/*
* IRQ system settings.
*/
#define STM32_IRQ_EXTI0_PRIORITY 6
#define STM32_IRQ_EXTI1_PRIORITY 6
#define STM32_IRQ_EXTI2_PRIORITY 6
#define STM32_IRQ_EXTI3_PRIORITY 6
#define STM32_IRQ_EXTI4_PRIORITY 6
#define STM32_IRQ_EXTI5_9_PRIORITY 6
#define STM32_IRQ_EXTI10_15_PRIORITY 6
#define STM32_IRQ_EXTI16_PRIORITY 6
#define STM32_IRQ_EXTI17_PRIORITY 15
#define STM32_IRQ_EXTI18_PRIORITY 6
#define STM32_IRQ_EXTI19_PRIORITY 6
#define STM32_IRQ_EXTI20_PRIORITY 6
#define STM32_IRQ_EXTI21_PRIORITY 15
#define STM32_IRQ_EXTI22_PRIORITY 15
/* /*
* ADC driver system settings. * ADC driver system settings.
*/ */
@@ -74,22 +92,6 @@
#define STM32_ADC_IRQ_PRIORITY 6 #define STM32_ADC_IRQ_PRIORITY 6
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 #define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6
/*
* EXT driver system settings.
*/
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
#define STM32_EXT_EXTI17_IRQ_PRIORITY 15
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
#define STM32_EXT_EXTI22_IRQ_PRIORITY 15
/* /*
* GPT driver system settings. * GPT driver system settings.
*/ */
@@ -164,9 +166,9 @@
* PWM driver system settings. * PWM driver system settings.
*/ */
#define STM32_PWM_USE_ADVANCED FALSE #define STM32_PWM_USE_ADVANCED FALSE
#define STM32_PWM_USE_TIM1 TRUE #define STM32_PWM_USE_TIM1 FALSE
#define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM2 FALSE
#define STM32_PWM_USE_TIM3 TRUE #define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM5 FALSE #define STM32_PWM_USE_TIM5 FALSE
#define STM32_PWM_USE_TIM9 FALSE #define STM32_PWM_USE_TIM9 FALSE
@@ -182,11 +184,9 @@
*/ */
#define STM32_SERIAL_USE_USART1 FALSE #define STM32_SERIAL_USE_USART1 FALSE
#define STM32_SERIAL_USE_USART2 FALSE #define STM32_SERIAL_USE_USART2 FALSE
#define STM32_SERIAL_USE_USART3 FALSE
#define STM32_SERIAL_USE_USART6 FALSE #define STM32_SERIAL_USE_USART6 FALSE
#define STM32_SERIAL_USART1_PRIORITY 12 #define STM32_SERIAL_USART1_PRIORITY 12
#define STM32_SERIAL_USART2_PRIORITY 12 #define STM32_SERIAL_USART2_PRIORITY 12
#define STM32_SERIAL_USART3_PRIORITY 12
#define STM32_SERIAL_USART6_PRIORITY 12 #define STM32_SERIAL_USART6_PRIORITY 12
/* /*
@@ -195,28 +195,18 @@
#define STM32_SPI_USE_SPI1 TRUE #define STM32_SPI_USE_SPI1 TRUE
#define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI2 FALSE
#define STM32_SPI_USE_SPI3 FALSE #define STM32_SPI_USE_SPI3 FALSE
#define STM32_SPI_USE_SPI4 FALSE
#define STM32_SPI_USE_SPI5 FALSE
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) #define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) #define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) #define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) #define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) #define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
#define STM32_SPI_SPI4_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
#define STM32_SPI_SPI4_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
#define STM32_SPI_SPI5_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
#define STM32_SPI_SPI5_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6)
#define STM32_SPI_SPI1_DMA_PRIORITY 1 #define STM32_SPI_SPI1_DMA_PRIORITY 1
#define STM32_SPI_SPI2_DMA_PRIORITY 1 #define STM32_SPI_SPI2_DMA_PRIORITY 1
#define STM32_SPI_SPI3_DMA_PRIORITY 1 #define STM32_SPI_SPI3_DMA_PRIORITY 1
#define STM32_SPI_SPI4_DMA_PRIORITY 1
#define STM32_SPI_SPI5_DMA_PRIORITY 1
#define STM32_SPI_SPI1_IRQ_PRIORITY 10 #define STM32_SPI_SPI1_IRQ_PRIORITY 10
#define STM32_SPI_SPI2_IRQ_PRIORITY 10 #define STM32_SPI_SPI2_IRQ_PRIORITY 10
#define STM32_SPI_SPI3_IRQ_PRIORITY 10 #define STM32_SPI_SPI3_IRQ_PRIORITY 10
#define STM32_SPI_SPI4_IRQ_PRIORITY 10
#define STM32_SPI_SPI5_IRQ_PRIORITY 10
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
/* /*
@@ -230,23 +220,18 @@
*/ */
#define STM32_UART_USE_USART1 FALSE #define STM32_UART_USE_USART1 FALSE
#define STM32_UART_USE_USART2 FALSE #define STM32_UART_USE_USART2 FALSE
#define STM32_UART_USE_USART3 FALSE
#define STM32_UART_USE_USART6 FALSE #define STM32_UART_USE_USART6 FALSE
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) #define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) #define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) #define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) #define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) #define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
#define STM32_UART_USART1_IRQ_PRIORITY 12 #define STM32_UART_USART1_IRQ_PRIORITY 12
#define STM32_UART_USART2_IRQ_PRIORITY 12 #define STM32_UART_USART2_IRQ_PRIORITY 12
#define STM32_UART_USART3_IRQ_PRIORITY 12
#define STM32_UART_USART6_IRQ_PRIORITY 12 #define STM32_UART_USART6_IRQ_PRIORITY 12
#define STM32_UART_USART1_DMA_PRIORITY 0 #define STM32_UART_USART1_DMA_PRIORITY 0
#define STM32_UART_USART2_DMA_PRIORITY 0 #define STM32_UART_USART2_DMA_PRIORITY 0
#define STM32_UART_USART3_DMA_PRIORITY 0
#define STM32_UART_USART6_DMA_PRIORITY 0 #define STM32_UART_USART6_DMA_PRIORITY 0
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
+9 -18
View File
@@ -50,29 +50,20 @@ void rgblight_set(void) {
} }
#endif #endif
void matrix_scan_kb(void) { matrix_scan_user(); } void matrix_init_kb(void) { matrix_init_user(); }
void matrix_init_kb(void) {
matrix_init_user();
}
__attribute__((weak)) __attribute__((weak))
void matrix_init_user(void) { void matrix_init_user(void) { }
#ifdef RGBLIGHT_ENABLE
rgblight_enable();
#endif
#ifdef RGB_MATRIX_ENABLE void matrix_scan_kb(void) {
rgb_matrix_disable(); #ifdef RGBLIGHT_ENABLE
rgblight_task();
#endif #endif
matrix_scan_user();
} }
__attribute__((weak)) __attribute__((weak))
void matrix_scan_user(void) { void matrix_scan_user(void) { }
#ifdef RGBLIGHT_ENABLE
rgblight_task();
#endif
}
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
@@ -184,9 +175,9 @@ led_config_t g_led_config = {
{ 20, 16},{ 42, 32}, { 20, 16},{ 42, 32},
{ 45, 16},{ 50, 16},{ 65, 16},{ 80, 16},{ 95, 16},{ 70, 32},{ 84, 32},{ 98, 32}, { 45, 16},{ 50, 16},{ 65, 16},{ 80, 16},{ 95, 16},{ 70, 32},{ 84, 32},{ 98, 32},
{ 14, 32},{ 56, 32},{ 50, 48},{ 80, 48},{110, 48},{ 95, 48},{100, 64},{112, 64}, { 14, 32},{ 56, 32},{ 65, 48},{ 80, 48},{110, 48},{ 95, 48},{112, 64},{100, 64},
{ 42, 32},{ 38, 64}, { 42, 32},{ 38, 64},
{ 0, 32},{ 10, 48},{ 0, 48},{ 20, 48},{ 35, 48},{ 65, 48},{ 0, 64},{ 19, 64}, { 0, 32},{ 10, 48},{ 0, 48},{ 20, 48},{ 35, 48},{ 50, 48},{ 0, 64},{ 19, 64},
{105, 0},{120, 0},{135, 0},{150, 0},{165, 0},{180, 0},{202, 0},{224, 0}, {105, 0},{120, 0},{135, 0},{150, 0},{165, 0},{180, 0},{202, 0},{224, 0},
{110, 16},{224, 16}, {110, 16},{224, 16},
+4 -6
View File
@@ -37,20 +37,18 @@ OPT_DEFS =
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # USB Nkey Rollover NKRO_ENABLE = no # USB Nkey Rollover
NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in
CUSTOM_MATRIX = yes
RGB_MATRIX_ENABLE = yes RGB_MATRIX_ENABLE = yes
RGBLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_CUSTOM_DRIVER = yes
CUSTOM_MATRIX = yes
# project specific files # project specific files
SRC += \ SRC += ws2812.c matrix.c
matrix.c \
ws2812.c
+49 -3
View File
@@ -11,7 +11,14 @@ from milc import cli
from qmk import submodules from qmk import submodules
from qmk.questions import yesno from qmk.questions import yesno
ESSENTIAL_BINARIES = ['dfu-programmer', 'avrdude', 'dfu-util', 'avr-gcc', 'arm-none-eabi-gcc', 'bin/qmk'] ESSENTIAL_BINARIES = {
'dfu-programmer': {},
'avrdude': {},
'dfu-util': {},
'avr-gcc': {},
'arm-none-eabi-gcc': {},
'bin/qmk': {},
}
ESSENTIAL_SUBMODULES = ['lib/chibios', 'lib/lufa'] ESSENTIAL_SUBMODULES = ['lib/chibios', 'lib/lufa']
@@ -24,12 +31,42 @@ def _udev_rule(vid, pid=None):
return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid
def check_arm_gcc_version():
"""Returns True if the arm-none-eabi-gcc version is not known to cause problems.
"""
if 'output' in ESSENTIAL_BINARIES['arm-none-eabi-gcc']:
first_line = ESSENTIAL_BINARIES['arm-none-eabi-gcc']['output'].split('\n')[0]
second_half = first_line.split(')', 1)[1].strip()
version_number = second_half.split()[0]
cli.log.info('Found arm-none-eabi-gcc version %s', version_number)
return True # Right now all known arm versions are ok
def check_avr_gcc_version():
"""Returns True if the avr-gcc version is not known to cause problems.
"""
if 'output' in ESSENTIAL_BINARIES['avr-gcc']:
first_line = ESSENTIAL_BINARIES['avr-gcc']['output'].split('\n')[0]
version_number = first_line.split()[2]
major, minor, rest = version_number.split('.', 2)
if int(major) > 8:
cli.log.error('We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.')
return False
cli.log.info('Found avr-gcc version %s', version_number)
return True
return False
def check_binaries(): def check_binaries():
"""Iterates through ESSENTIAL_BINARIES and tests them. """Iterates through ESSENTIAL_BINARIES and tests them.
""" """
ok = True ok = True
for binary in ESSENTIAL_BINARIES: for binary in sorted(ESSENTIAL_BINARIES):
if not is_executable(binary): if not is_executable(binary):
ok = False ok = False
@@ -116,7 +153,9 @@ def is_executable(command):
return False return False
# Make sure the command can be executed # Make sure the command can be executed
check = subprocess.run([command, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5) check = subprocess.run([command, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5, universal_newlines=True)
ESSENTIAL_BINARIES[command]['output'] = check.stdout
if check.returncode in [0, 1]: # Older versions of dfu-programmer exit 1 if check.returncode in [0, 1]: # Older versions of dfu-programmer exit 1
cli.log.debug('Found {fg_cyan}%s', command) cli.log.debug('Found {fg_cyan}%s', command)
return True return True
@@ -196,6 +235,13 @@ def doctor(cli):
else: else:
ok = False ok = False
# Make sure the tools are at the correct version
if not check_arm_gcc_version():
ok = False
if not check_avr_gcc_version():
ok = False
# Check out the QMK submodules # Check out the QMK submodules
sub_ok = check_submodules() sub_ok = check_submodules()
+153 -34
View File
@@ -13,44 +13,163 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef KEYMAP_NORWEGIAN_H
#define KEYMAP_NORWEGIAN_H
#include "keymap_nordic.h" #pragma once
// There are slight differrences in the keyboards in the nordic contries #include "keymap.h"
// Norwegian redifinitions from the nordic keyset // clang-format off
#undef NO_ACUT
#define NO_ACUT ALGR(NO_BSLS) // ´ /*
#undef NO_AE * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
#define NO_AE KC_QUOT // æ * │ | │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ \ │       │
#undef NO_BSLS * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
#define NO_BSLS KC_EQL // '\' * │     │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │     │
#undef NO_CIRC * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
#define NO_CIRC LSFT(KC_RBRC) // ^ * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ø │ Æ │ ' │    │
#undef NO_GRV * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
#define NO_GRV LSFT(NO_BSLS) // * │    │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │          │
#undef NO_OSLH * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
#define NO_OSLH KC_SCLN // ø * │    │    │    │                        │    │    │    │    │
#undef NO_PIPE * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
// Row 1
#define NO_PIPE KC_GRV // | #define NO_PIPE KC_GRV // |
#define NO_1 KC_1 // 1
#define NO_2 KC_2 // 2
#define NO_3 KC_3 // 3
#define NO_4 KC_4 // 4
#define NO_5 KC_5 // 5
#define NO_6 KC_6 // 6
#define NO_7 KC_7 // 7
#define NO_8 KC_8 // 8
#define NO_9 KC_9 // 9
#define NO_0 KC_0 // 0
#define NO_PLUS KC_MINS // +
#define NO_BSLS KC_EQL // (backslash)
// Row 2
#define NO_Q KC_Q // Q
#define NO_W KC_W // W
#define NO_E KC_E // E
#define NO_R KC_R // R
#define NO_T KC_T // T
#define NO_Y KC_Y // Y
#define NO_U KC_U // U
#define NO_I KC_I // I
#define NO_O KC_O // O
#define NO_P KC_P // P
#define NO_ARNG KC_LBRC // Å
#define NO_DIAE KC_RBRC // ¨ (dead)
// Row 3
#define NO_A KC_A // A
#define NO_S KC_S // S
#define NO_D KC_D // D
#define NO_F KC_F // F
#define NO_G KC_G // G
#define NO_H KC_H // H
#define NO_J KC_J // J
#define NO_K KC_K // K
#define NO_L KC_L // L
#define NO_OSTR KC_SCLN // Ø
#define NO_AE KC_QUOT // Æ
#define NO_QUOT KC_NUHS // '
// Row 4
#define NO_LABK KC_NUBS // <
#define NO_Z KC_Z // Z
#define NO_X KC_X // X
#define NO_C KC_C // C
#define NO_V KC_V // V
#define NO_B KC_B // B
#define NO_N KC_N // N
#define NO_M KC_M // M
#define NO_COMM KC_COMM // ,
#define NO_DOT KC_DOT // .
#define NO_MINS KC_SLSH // -
// Additional norwegian keys not defined in the nordic keyset /* Shifted symbols
#define NO_AA KC_LBRC // å * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
#define NO_ASTR LSFT(KC_BSLS) // * * │ § │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │       │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │     │   │   │   │   │   │   │   │   │   │   │   │ ^ │     │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
* │      │   │   │   │   │   │   │   │   │   │   │   │ * │    │
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
* │    │ > │   │   │   │   │   │   │   │ ; │ : │ _ │          │
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │    │    │    │                        │    │    │    │    │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
// Row 1
#define NO_SECT S(NO_PIPE) // §
#define NO_EXLM S(NO_1) // !
#define NO_DQUO S(NO_2) // "
#define NO_HASH S(NO_3) // #
#define NO_CURR S(NO_4) // ¤
#define NO_PERC S(NO_5) // %
#define NO_AMPR S(NO_6) // &
#define NO_SLSH S(NO_7) // /
#define NO_LPRN S(NO_8) // (
#define NO_RPRN S(NO_9) // )
#define NO_EQL S(NO_0) // =
#define NO_QUES S(NO_PLUS) // ?
#define NO_GRV S(NO_BSLS) // ` (dead)
// Row 2
#define NO_CIRC S(NO_DIAE) // ^ (dead)
// Row 3
#define NO_ASTR S(NO_QUOT) // *
// Row 4
#define NO_RABK S(NO_LABK) // >
#define NO_SCLN S(NO_COMM) // ;
#define NO_COLN S(NO_DOT) // :
#define NO_UNDS S(NO_MINS) // _
// Norwegian unique MAC characters /* AltGr symbols
#define NO_ACUT_MAC KC_EQL // = * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
#define NO_APOS_MAC KC_NUBS // ' * │   │   │ @ │ £ │ $ │ € │   │ { │ [ │ ] │ } │   │ ´ │       │
#define NO_AT_MAC KC_BSLS // @ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
#define NO_BSLS_MAC ALGR(LSFT(KC_7)) // '\' * │     │   │   │   │   │   │   │   │   │   │   │   │ ~ │     │
#define NO_DLR_MAC LSFT(KC_4) // $ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
#define NO_GRV_MAC ALGR(NO_BSLS) // ` * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │
#define NO_GRTR_MAC LSFT(KC_GRV) // > * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
#define NO_LCBR_MAC ALGR(LSFT(KC_8)) // } * │    │   │   │   │   │   │   │   │ µ │   │   │   │          │
#define NO_LESS_MAC KC_GRV // > * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
#define NO_PIPE_MAC ALGR(KC_7) // | * │    │    │    │                        │    │    │    │    │
#define NO_RCBR_MAC ALGR(LSFT(KC_9)) // } * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
// Row 1
#define NO_AT ALGR(NO_2) // @
#define NO_PND ALGR(NO_3) // £
#define NO_DLR ALGR(NO_4) // $
#define NO_EURO ALGR(NO_5) // €
#define NO_LCBR ALGR(NO_7) // {
#define NO_LBRC ALGR(NO_8) // [
#define NO_RBRC ALGR(NO_9) // ]
#define NO_RCBR ALGR(NO_0) // }
#define NO_ACUT ALGR(NO_BSLS) // ´ (dead)
// Row 2
#define NO_TILD ALGR(NO_DIAE) // ~ (dead)
// Row 4
#define NO_MICR ALGR(NO_M) // µ
#endif // DEPRECATED
#define NO_AM NO_ARNG
#define NO_AA NO_ARNG
#define NO_OSLH NO_OSTR
#define NO_APOS NO_QUOT
#define NO_LESS NO_LABK
#define NO_QUO2 NO_DQUO
#define NO_BULT NO_CURR
#define NO_GRTR NO_RABK
#define NO_MU NO_MICR
// Norwegian macOS symbols
#define NO_ACUT_MAC NO_BSLS // ´
#define NO_APOS_MAC NO_LABK // '
#define NO_AT_MAC NO_QUOT // @
#define NO_BSLS_MAC S(ALGR(NO_7)) // (backslash)
#define NO_DLR_MAC S(NO_4) // $
#define NO_GRV_MAC ALGR(NO_BSLS) // `
#define NO_GRTR_MAC S(NO_PIPE) // >
#define NO_LCBR_MAC S(ALGR(NO_8)) // {
#define NO_LESS_MAC NO_PIPE // <
#define NO_PIPE_MAC ALGR(NO_7) // |
#define NO_RCBR_MAC S(ALGR(NO_9)) // }
@@ -0,0 +1,100 @@
/* Copyright 2019
*
* 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 Norwegian layouts
#pragma once
#include "keymap_norwegian.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, 1, 1, 1, 0, 1, 1, 0),
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 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, 0, 0, 0, 0)
};
const uint8_t ascii_to_altgr_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, 0, 0, 1, 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(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, 1, 0, 1, 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, 0, 1, 0, 1, 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, NO_1, NO_2, NO_3, NO_4, NO_5, NO_6, NO_QUOT,
// ( ) * + , - . /
NO_8, NO_9, NO_QUOT, NO_PLUS, NO_COMM, NO_MINS, NO_DOT, NO_7,
// 0 1 2 3 4 5 6 7
NO_0, NO_1, NO_2, NO_3, NO_4, NO_5, NO_6, NO_7,
// 8 9 : ; < = > ?
NO_8, NO_9, NO_DOT, NO_COMM, NO_LABK, NO_0, NO_LABK, NO_PLUS,
// @ A B C D E F G
NO_2, NO_A, NO_B, NO_C, NO_D, NO_E, NO_F, NO_G,
// H I J K L M N O
NO_H, NO_I, NO_J, NO_K, NO_L, NO_M, NO_N, NO_O,
// P Q R S T U V W
NO_P, NO_Q, NO_R, NO_S, NO_T, NO_U, NO_V, NO_W,
// X Y Z [ \ ] ^ _
NO_X, NO_Y, NO_Z, NO_8, NO_BSLS, NO_9, NO_DIAE, NO_MINS,
// ` a b c d e f g
NO_BSLS, NO_A, NO_B, NO_C, NO_D, NO_E, NO_F, NO_G,
// h i j k l m n o
NO_H, NO_I, NO_J, NO_K, NO_L, NO_M, NO_N, NO_O,
// p q r s t u v w
NO_P, NO_Q, NO_R, NO_S, NO_T, NO_U, NO_V, NO_W,
// x y z { | } ~ DEL
NO_X, NO_Y, NO_Z, NO_7, NO_PIPE, NO_0, NO_DIAE, KC_DEL
};