aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kemp <20897849+mkem114@users.noreply.github.com>2018-11-21 07:11:23 +1300
committerDrashna Jaelre <drashna@live.com>2018-11-20 10:11:23 -0800
commit303fa4ec3337760922a17fb19150c1aa3f58a3b3 (patch)
tree7411dd8073184e2b76d17fc41010d8eafe96c5a2
parent93c0362552603f2d2517ff3b5afe2667968e3bda (diff)
downloadqmk_firmware-303fa4ec3337760922a17fb19150c1aa3f58a3b3.tar.gz
qmk_firmware-303fa4ec3337760922a17fb19150c1aa3f58a3b3.zip
Keyboard: Add Handwired 108 Key with Trackpoint (#4448)
* Include both base keyboards * Merge the keymap * Merge the configs * Add wiring diagram for clarity of documentation * Merge rules * Merge keyboard sources * Change names to compile * Update documentation to suit * Add qwerty layout to 108keyTrackpoint * Separate the dvorak standard layout from a media focused one * Update documentation to reflect new keymaps * [style] Add empty lines at ends of files * [style] Meet current QMK style guide * Bring READEME closer to the QMK template * [style] Change all "108keyTrackpoint" to "108key_trackpoint" * [style] Use "LAYOUT" instead of "KEYMAP" QMK terminology has changed Co-Authored-By: mkem114 <20897849+mkem114@users.noreply.github.com> * Add two spaces after maintainer in README This is required to render properly Co-Authored-By: mkem114 <20897849+mkem114@users.noreply.github.com> * Remove redundant line "PREVENT_STUCK_MODIFIERS" is default on for QMK Co-Authored-By: mkem114 <20897849+mkem114@users.noreply.github.com> * Change include of keymaps to use QMK_KEYBOARD_H This includes automatically * Update make rules to match template * Change from KC_MENU to KC_APP The button functionality actually wanted is the context menu key * [style] Change "dvorakMedia" to "dvorak_media" * Update README to reflect minor changes
-rw-r--r--keyboards/handwired/108key_trackpoint/108key_trackpoint.c1
-rw-r--r--keyboards/handwired/108key_trackpoint/108key_trackpoint.h23
-rw-r--r--keyboards/handwired/108key_trackpoint/README.md23
-rw-r--r--keyboards/handwired/108key_trackpoint/config.h73
-rw-r--r--keyboards/handwired/108key_trackpoint/keymaps/default/keymap.c14
-rw-r--r--keyboards/handwired/108key_trackpoint/keymaps/dvorak/keymap.c14
-rw-r--r--keyboards/handwired/108key_trackpoint/keymaps/dvorak_media/keymap.c14
-rw-r--r--keyboards/handwired/108key_trackpoint/rules.mk82
8 files changed, 244 insertions, 0 deletions
diff --git a/keyboards/handwired/108key_trackpoint/108key_trackpoint.c b/keyboards/handwired/108key_trackpoint/108key_trackpoint.c
new file mode 100644
index 000000000..3834f8961
--- /dev/null
+++ b/keyboards/handwired/108key_trackpoint/108key_trackpoint.c
@@ -0,0 +1 @@
#include "108key_trackpoint.h"
diff --git a/keyboards/handwired/108key_trackpoint/108key_trackpoint.h b/keyboards/handwired/108key_trackpoint/108key_trackpoint.h
new file mode 100644
index 000000000..100f4cb93
--- /dev/null
+++ b/keyboards/handwired/108key_trackpoint/108key_trackpoint.h
@@ -0,0 +1,23 @@
1#pragma once
2
3#include "quantum.h"
4
5#define LAYOUT( \
6 K000, K002, K003, K004, K005, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K019, K020, K021, K022, \
7 \
8 K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K219, K220, K221, K222, \
9 K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K319, K320, K321, \
10 K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K419, K420, K421, K422, \
11 K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K513, K516, K519, K520, K521, \
12 K600, K601, K603, K606, K610, K611, K613, K614, K615, K616, K617, K619, K621, K622, \
13 K705, K706, K707 \
14) { \
15 { K000, KC_NO, K002, K003, K004, K005, KC_NO, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, KC_NO, K019, K020, K021, K022 }, \
16 { 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 }, \
17 { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215, K216, K217, KC_NO, K219, K220, K221, K222 }, \
18 { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, KC_NO, K319, K320, K321, KC_NO }, \
19 { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K419, K420, K421, K422 }, \
20 { KC_NO, K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, KC_NO, KC_NO, K516, KC_NO, KC_NO, K519, K520, K521, KC_NO }, \
21 { K600, K601, KC_NO, K603, KC_NO, KC_NO, K606, KC_NO, KC_NO, KC_NO, K610, K611, KC_NO, K613, K614, K615, K616, K617, KC_NO, K619, KC_NO, K621, K622 }, \
22 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K705, K706, K707, 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 } \
23}
diff --git a/keyboards/handwired/108key_trackpoint/README.md b/keyboards/handwired/108key_trackpoint/README.md
new file mode 100644
index 000000000..247043e17
--- /dev/null
+++ b/keyboards/handwired/108key_trackpoint/README.md
@@ -0,0 +1,23 @@
1# 108 Key with TrackPoint
2
3![wiring](https://raw.githubusercontent.com/qmk/qmk.fm/gh-pages/keyboards/handwired/108key_trackpoint/wiring.JPG)
4
5This is based off the handwired/trackpoint keyboard and generated code from [Keyboard Firmware Builder](https://kbfirmware.com/).
6
7Keyboard Maintainer: [mkem114](https://github.com/mkem114)
8Hardware Supported (tested): Teensy++ 2.0
9
10Make example for this keyboard (after setting up your build environment):
11
12 make handwired/108keyTrackpoint:default
13
14See 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).
15
16You may have to modify the source code to suit 104 keys, RGB back-lights, different micro-controllers, or big ass enter.
17
18There are three keymaps:
19* qwerty with the four extra keys being: mute, media prev, media next, and media play
20* dvorak with the four extra keys being: mute, media prev, media next, and media play
21* dvorak_media with the caps lock being media play and the four extra keys being: mute, volume down, volume up, and media next
22
23To figure out how to wire your specific TrackPoint have a look out: [How to integrate a trackpoint in a mechanical keyboard](https://github.com/alonswartz/trackpoint).
diff --git a/keyboards/handwired/108key_trackpoint/config.h b/keyboards/handwired/108key_trackpoint/config.h
new file mode 100644
index 000000000..7a63fe262
--- /dev/null
+++ b/keyboards/handwired/108key_trackpoint/config.h
@@ -0,0 +1,73 @@
1#pragma once
2
3#include "config_common.h"
4
5#define VENDOR_ID 0x1234
6#define PRODUCT_ID 0x5678
7#define DEVICE_VER 0x0001
8#define MANUFACTURER QMK
9#define PRODUCT 108Key-Trackpoint
10#define DESCRIPTION A 108 key ANSI keyboard with a trackpoint and three mouse buttons
11
12#define MATRIX_ROWS 8
13#define MATRIX_COLS 23
14
15#ifdef PS2_USE_USART
16 #define PS2_CLOCK_PORT PORTD
17 #define PS2_CLOCK_PIN PIND
18 #define PS2_CLOCK_DDR DDRD
19 #define PS2_CLOCK_BIT 5
20 #define PS2_DATA_PORT PORTD
21 #define PS2_DATA_PIN PIND
22 #define PS2_DATA_DDR DDRD
23 #define PS2_DATA_BIT 2
24
25 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
26 /* set DDR of CLOCK as input to be slave */
27 #define PS2_USART_INIT() do { \
28 PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
29 PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
30 UCSR1C = ((1 << UMSEL10) | \
31 (3 << UPM10) | \
32 (0 << USBS1) | \
33 (3 << UCSZ10) | \
34 (0 << UCPOL1)); \
35 UCSR1A = 0; \
36 UBRR1H = 0; \
37 UBRR1L = 0; \
38 } while (0)
39 #define PS2_USART_RX_INT_ON() do { \
40 UCSR1B = ((1 << RXCIE1) | \
41 (1 << RXEN1)); \
42 } while (0)
43 #define PS2_USART_RX_POLL_ON() do { \
44 UCSR1B = (1 << RXEN1); \
45 } while (0)
46 #define PS2_USART_OFF() do { \
47 UCSR1C = 0; \
48 UCSR1B &= ~((1 << RXEN1) | \
49 (1 << TXEN1)); \
50 } while (0)
51 #define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
52 #define PS2_USART_RX_DATA UDR1
53 #define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
54 #define PS2_USART_RX_VECT USART1_RX_vect
55#endif
56
57#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
58#define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5, C6, C7, D0, D1, F0, D3, D4, F1, D6, D7, E0, E1, E2, E3, E4, E5, E6 }
59#define UNUSED_PINS
60
61/* COL2ROW or ROW2COL */
62#define DIODE_DIRECTION COL2ROW
63
64#define DEBOUNCING_DELAY 5
65
66#define LOCKING_SUPPORT_ENABLE
67#define LOCKING_RESYNC_ENABLE
68
69/* key combination for commkand */
70#define IS_COMMAND() ( \
71 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
72)
73
diff --git a/keyboards/handwired/108key_trackpoint/keymaps/default/keymap.c b/keyboards/handwired/108key_trackpoint/keymaps/default/keymap.c
new file mode 100644
index 000000000..3345aca16
--- /dev/null
+++ b/keyboards/handwired/108key_trackpoint/keymaps/default/keymap.c
@@ -0,0 +1,14 @@
1#include QMK_KEYBOARD_H
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 [0] = LAYOUT (
5 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY,
6
7 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
8 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9,
9 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_P4, KC_P5, KC_P6, KC_PPLS,
10 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3,
11 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_APP, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT,
12 KC_BTN1, KC_BTN3, KC_BTN2
13 )
14};
diff --git a/keyboards/handwired/108key_trackpoint/keymaps/dvorak/keymap.c b/keyboards/handwired/108key_trackpoint/keymaps/dvorak/keymap.c
new file mode 100644
index 000000000..0181ad9f7
--- /dev/null
+++ b/keyboards/handwired/108key_trackpoint/keymaps/dvorak/keymap.c
@@ -0,0 +1,14 @@
1#include QMK_KEYBOARD_H
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 [0] = LAYOUT (
5 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY,
6
7 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
8 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, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9,
9 KC_CAPS, 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_P4, KC_P5, KC_P6, KC_PPLS,
10 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3,
11 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_APP, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT,
12 KC_BTN1, KC_BTN3, KC_BTN2
13 )
14};
diff --git a/keyboards/handwired/108key_trackpoint/keymaps/dvorak_media/keymap.c b/keyboards/handwired/108key_trackpoint/keymaps/dvorak_media/keymap.c
new file mode 100644
index 000000000..d6223c496
--- /dev/null
+++ b/keyboards/handwired/108key_trackpoint/keymaps/dvorak_media/keymap.c
@@ -0,0 +1,14 @@
1#include QMK_KEYBOARD_H
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 [0] = LAYOUT (
5 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT,
6
7 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
8 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, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9,
9 KC_MPLY, 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_P4, KC_P5, KC_P6, KC_PPLS,
10 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3,
11 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_APP, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT,
12 KC_BTN1, KC_BTN3, KC_BTN2
13 )
14};
diff --git a/keyboards/handwired/108key_trackpoint/rules.mk b/keyboards/handwired/108key_trackpoint/rules.mk
new file mode 100644
index 000000000..84ec52eee
--- /dev/null
+++ b/keyboards/handwired/108key_trackpoint/rules.mk
@@ -0,0 +1,82 @@
1# MCU name
2MCU = at90usb1286
3#MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Bootloader selection
43# Teensy halfkay
44# Pro Micro caterina
45# Atmel DFU atmel-dfu
46# LUFA DFU lufa-dfu
47# QMK DFU qmk-dfu
48# atmega32a bootloadHID
49BOOTLOADER = halfkay
50
51
52# If you don't know the bootloader type, then you can specify the
53# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
54# Teensy halfKay 512
55# Teensy++ halfKay 1024
56# Atmel DFU loader 4096
57# LUFA bootloader 4096
58# USBaspLoader 2048
59# OPT_DEFS += -DBOOTLOADER_SIZE=4096
60
61# Build Options
62# change yes to no to disable
63#
64BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
65MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
66EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
67CONSOLE_ENABLE = yes # Console for debug(+400)
68COMMAND_ENABLE = yes # Commands for debug and configuration
69# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
70SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
71# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
72NKRO_ENABLE = yes # USB Nkey Rollover
73BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
74RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
75MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
76UNICODE_ENABLE = no # Unicode
77BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
78AUDIO_ENABLE = no # Audio output on port C6
79FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
80HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
81PS2_MOUSE_ENABLE = yes
82PS2_USE_USART = yes