summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilip Sund <filip.sund@gmail.com>2018-10-03 19:12:27 +0200
committerDrashna Jaelre <drashna@live.com>2018-10-03 10:12:27 -0700
commitf01133d08918b3d1dd7b349309b02ffd37273f5c (patch)
tree5aaf1555eb2a9fc25d5fa289994110abc7ac90ed
parente58ea882e40eff146b9cebf9e1c99e89f25260ac (diff)
Keyboard: Add handwired/pteron config and keymaps (#4060)
* Added pteron files made via from kbfirmware.com. * Added readme. * Made some progress on Pteron keymap. * More keymap. * Updated bootloader, added some keymap illustrations. * Moved default keymap to FSund, made default keymap from default preonic keymap. * Fixed typo in default pteron keymap. * Made changes recommended by drashna.
-rw-r--r--keyboards/handwired/pteron/config.h34
-rw-r--r--keyboards/handwired/pteron/keymaps/FSund/keymap.c118
-rw-r--r--keyboards/handwired/pteron/keymaps/default/keymap.c104
-rw-r--r--keyboards/handwired/pteron/pteron.c1
-rw-r--r--keyboards/handwired/pteron/pteron.h17
-rw-r--r--keyboards/handwired/pteron/readme.md15
-rw-r--r--keyboards/handwired/pteron/rules.mk58
7 files changed, 347 insertions, 0 deletions
diff --git a/keyboards/handwired/pteron/config.h b/keyboards/handwired/pteron/config.h
new file mode 100644
index 0000000000..9650839e30
--- /dev/null
+++ b/keyboards/handwired/pteron/config.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER QMK Community
+#define PRODUCT Pteron Keyboard
+#define DESCRIPTION Pteron Keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 12
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D7, E6, B4, B5, B6 }
+#define MATRIX_COL_PINS { F4, F6, F5, F7, B1, B3, C6, D4, D0, D1, D2, D3 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5 // 5 is default
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* prevent stuck modifiers */
+#define PREVENT_STUCK_MODIFIERS
diff --git a/keyboards/handwired/pteron/keymaps/FSund/keymap.c b/keyboards/handwired/pteron/keymaps/FSund/keymap.c
new file mode 100644
index 0000000000..f34beae063
--- /dev/null
+++ b/keyboards/handwired/pteron/keymaps/FSund/keymap.c
@@ -0,0 +1,118 @@
+#include QMK_KEYBOARD_H
+
+enum pteron_layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+// use S() to produce shifted versions of keys
+// #define S(kc) LSFT(kc) // defined by default
+
+// alt gr
+#define G(kc) RALT(kc)
+
+// custom keycodes
+// use F_ prefix to avoid problems
+
+// NB! I use Norwegian keyboard layout on my machines, so the keymap probably
+// doesn't make much sense for US/ANSI users
+
+#define F_FSLH S(KC_7) // forward slash
+#define F_BSLH KC_EQL // backward slash
+#define F_EQL S(KC_0) // equals sign
+#define F_APOS KC_BSLS // '
+#define F_TIMES S(KC_BSLS) // *
+#define F_PLUS KC_MINS // +
+#define F_QUEST S(KC_MINS) // ?
+#define F_HAT S(KC_RBRC) // ^
+#define F_TILD G(KC_RBRC) // ~
+#define F_UML KC_RBRC // ¨ (umlaut)
+#define F_SECT S(KC_GRV) // section sign ("law sign") (shifted key below esc)
+#define F_GRAVE S(KC_EQL)
+#define F_ACUTE G(KC_EQL)
+
+#define KC_AA KC_LBRC
+#define KC_OE KC_SCLN
+#define KC_AE KC_QUOT
+
+// brackets
+#define F_SBRL G(KC_8) // square bracket left
+#define F_SBRR G(KC_9) // square bracket right
+#define F_CBRL G(KC_7) // curly bracket left
+#define F_CBRR G(KC_0) // curly bracket right
+#define F_RBRL S(KC_8) // round bracket left
+#define F_RBRR S(KC_9) // round bracket right
+#define F_ABRL KC_NUBS // angle bracket left
+#define F_ABRR S(KC_NUBS) // angle bracket right
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* QWERTY
+ * +-----------------------------------------+ +-----------------------------------------+
+ * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Å |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Ctrl | A | S | D | F | G | | H | J | K | L | Ø | Æ |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Shft | Z | X | C | V | B | | N | M | , | . | - | Shft |
+ * +---------------------------+------+------+-------------+ +-------------+------+------+---------------------------+
+ * | LOWR | Spc | Alt | Win | | Win | Alt | Spc | RISE |
+ * +---------------------------+ +---------------------------+
+ */
+
+[_QWERTY] = LAYOUT(
+ KC_ESC, 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_AA,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_OE, KC_AE,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT,
+ LOWER, KC_SPC, KC_LALT, KC_LGUI, KC_RGUI, KC_RALT, KC_ENT, RAISE
+ ),
+
+/* LOWER
+ * +-----------------------------------------+ +-----------------------------------------+
+ * | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | \ | / | [ | ] | = | Del |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | F1 | F2 | F3 | F4 | F5 | | < | > | ( | ) | * | ~ |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | F6 | F7 | F8 | F9 | F10 | | F11 | F12 | { | } | + | |
+ * +---------------------------+------+------+-------------+ +-------------+------+------+---------------------------+
+ * | | | | | | | | | |
+ * +---------------------------+ +---------------------------+
+ */
+
+[_LOWER] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, F_BSLH, F_FSLH, F_SBRL, F_SBRR, F_EQL, KC_DEL,
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, F_ABRL, F_ABRR, F_RBRL, F_RBRR, F_TIMES, F_TILD,
+ _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, F_CBRL, F_CBRR, F_PLUS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+[_RAISE] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_AA,
+ F_SECT, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), F_QUEST, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, F_APOS,
+ _______, S(KC_6), G(KC_2), G(KC_3), G(KC_4), G(KC_5), F_HAT, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+[_ADJUST] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, F_UML, F_GRAVE, F_ACUTE, _______, RESET, _______, _______, _______, _______, KC_PSCR, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
diff --git a/keyboards/handwired/pteron/keymaps/default/keymap.c b/keyboards/handwired/pteron/keymaps/default/keymap.c
new file mode 100644
index 0000000000..3079cc7afd
--- /dev/null
+++ b/keyboards/handwired/pteron/keymaps/default/keymap.c
@@ -0,0 +1,104 @@
+#include QMK_KEYBOARD_H
+
+enum pteron_layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * +-----------------------------------------+ +-----------------------------------------+
+ * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
+ * +-------------+------+------+------+------| |------+------+------+------+-------------+
+ * |Lower | SPC | Alt | GUI | | Alt | GUI | SPC |Raise |
+ * +---------------------------+ +---------------------------+
+ */
+[_QWERTY] = LAYOUT( \
+ KC_ESC, 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_DEL, \
+ 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
+ LOWER, KC_SPC, KC_LALT, KC_LGUI, KC_RALT, KC_RGUI, KC_SPC, RAISE \
+),
+
+/* Lower
+ * +-----------------------------------------+ +-----------------------------------------+
+ * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO ~ |ISO | | | | |
+ * +-------------+------+------+------+------| |------+------+------+------+-------------+
+ * | | | | | | Next | Vol- | Vol+ | Play |
+ * +---------------------------+ +---------------------------+
+ */
+[_LOWER] = LAYOUT( \
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \
+ _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+),
+
+/* Raise
+ * +-----------------------------------------+ +-----------------------------------------+
+ * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO # |ISO / | | | |
+ * +-------------+------+------+------+------| |------+------+------+------+-------------+
+ * | | | | | | Next | Vol- | Vol+ | Play |
+ * +---------------------------+ +---------------------------+
+ */
+[_RAISE] = 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \
+ _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+),
+
+/* Adjust (Lower + Raise)
+ * +-----------------------------------------+ +-----------------------------------------+
+ * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | Reset| | | | | | | | | | | Del |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | |Aud on|AudOff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|MusOff|MidiOn| |MidOff| | | | | |
+ * +-------------+------+------+------+------| |------+------+------+------+-------------+
+ * | | | | | | | | | |
+ * +---------------------------+ +---------------------------+
+ */
+[_ADJUST] = 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, \
+ _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______ \
+)
+
+};
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
diff --git a/keyboards/handwired/pteron/pteron.c b/keyboards/handwired/pteron/pteron.c
new file mode 100644
index 0000000000..972b45aa20
--- /dev/null
+++ b/keyboards/handwired/pteron/pteron.c
@@ -0,0 +1 @@
+#include "pteron.h"
diff --git a/keyboards/handwired/pteron/pteron.h b/keyboards/handwired/pteron/pteron.h
new file mode 100644
index 0000000000..f29c2619af
--- /dev/null
+++ b/keyboards/handwired/pteron/pteron.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, \
+ K402, K403, K404, K405, K406, K407, K408, K409 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 }, \
+ { KC_NO, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, KC_NO, KC_NO } \
+}
diff --git a/keyboards/handwired/pteron/readme.md b/keyboards/handwired/pteron/readme.md
new file mode 100644
index 0000000000..a66d41edbb
--- /dev/null
+++ b/keyboards/handwired/pteron/readme.md
@@ -0,0 +1,15 @@
+# Pteron
+
+![Pteron](https://i.imgur.com/9QhPlVD.jpg)
+
+An ergonomic keyboard heavily inspired by the [Atreus](https://github.com/technomancy/atreus), [Iris](https://github.com/keebio/iris-case) and [Atreis](https://github.com/dekonnection/atreis) keyboards. More info and files for laser cutting plates and case are in the [Pteron repository](https://github.com/FSund/pteron-keyboard).
+
+Keyboard Maintainer: [Filip Sund](https://github.com/FSund)
+Hardware Supported: Pro Micro
+Hardware Availability: Handwired, no PCB's available (for now)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/pteron: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). \ No newline at end of file
diff --git a/keyboards/handwired/pteron/rules.mk b/keyboards/handwired/pteron/rules.mk
new file mode 100644
index 0000000000..10218020e6
--- /dev/null
+++ b/keyboards/handwired/pteron/rules.mk
@@ -0,0 +1,58 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no
+UNICODE_ENABLE = no
+UNICODEMAP_ENABLE = no \ No newline at end of file