Some revisions to cbbrowne Planck keymap, and a preliminary xd75 keymap (#1715)

* Add HOME/END keys as upper/lower on arrow-up/down

* Reduce .hex file size by turning off unneeded options

* Put digit keypad onto left hand upon RAISE; this will sometimes be preferable to double-hits of right hand

* Latest super latest version merge

* cbbrowne keymap for XD75re

* starting notes on XD75re keymap plans

* First draft of bottom row of QWERTY

* Switch my special bottom line over to QCENT

* Dunno

* Filling in wanted keys, bit by bit...

* Add copyright, extra macro

* Clean up comments, remove some experimental code I didn't like

* TODO plans for xd75re

* clean up keyboard layout

* QCENT2 is my new experiment for the main keyboard...

* Add a few more main layer keys, and modify LOWER to shift things outwards to conform with main layer

* Clean up RAISE layer to conform with main layer, remove QCENT layer as QCENT2 is the new thing

* More xd75 changes, now that I actually have it in hand

* shift keymap around, as original attempt was a bit too aggressive in keeping to the edges

* more revs to XD75

* Dropping parts of the centre keypad in favor of Keys I Really Need

* Improve documentation to conform with how builds are done now

* Improve documentation to conform with how builds are done now

* Add cbbrowne rules file as alternative to having the rules in Makefile

* Makefile not needed anymore for individual keymap
master
Christopher Browne 2017-09-14 14:02:49 -04:00 committed by Jack Humbert
parent 23ce0b43b6
commit a07d1f22aa
10 changed files with 596 additions and 37 deletions

View File

@ -1,3 +1,19 @@
/* Copyright 2017 Christopher Browne
*
* 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/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
@ -23,6 +39,7 @@
* borrowed from basic keymap */
#define _______ KC_TRNS
#define _____ KC_NO
#endif

View File

@ -40,11 +40,11 @@
/* Some interesting things implemented
- There is a macro that writes out "cbbrowne" to show that I could
- There is a macro that writes out "cbbrowne" just to show that I
could
- There is a (somewhat cruddy) linear congruential random number
generator.
- I would like to be seeding it with clock info to make it look
more random
- I seed it somewhat with clock info to make it look more random
- There are two macros that use the random number generators
- one, M_RANDDIGIT, generates a random digit based on state
of the random number generator
@ -59,10 +59,12 @@
- Need to think about what zsh and readline actions I use lots
- Ought to ensure that Control-Alt-Delete is convenient enough
- How about Alt-F1 thru Alt-F8?
- How about Alt-F1 thru Alt-F8? Not yet...
- What's the keystroke to get from X to console these days?
- A layer for doing console switching would not be a bad idea
- I haven't got page-up/page-down, let's have that...
- I'm messing with jeremy-dev's keymap that shifts everything
outwards. Gotta figure out how to make it sensible...
*/
enum layers {
@ -71,6 +73,21 @@ enum layers {
_RAISE, /* Raised layer, where top line has digits 1234567890 */
_KEYPAD, /* Key pad */
_ADJUST, /* Special Adjust layer coming via tri-placement */
};
enum my_keycodes {
MY_ABVE = SAFE_RANGE,
MY_BELW,
MY_TERM,
MY_DEQL, // /=
MY_MEQL, // *=
MY_SEQL, // -=
MY_PEQL, // +=
MY_NEQL, // !=
MY_LTGT, // <>
MY_DPIP, // ||
MY_DAMP, // &&
};
enum macro_id {
@ -132,9 +149,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{_______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{_______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ },
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
}
}
};
/* What is fn_actions actually used for??? */
const uint16_t PROGMEM fn_actions[] = {
};
@ -233,3 +251,119 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
}
return MACRO_NONE;
};
void press_key(uint16_t key) {
register_code(key);
unregister_code(key);
}
void press_two_keys(uint16_t key1, uint16_t key2) {
register_code(key1);
register_code(key2);
unregister_code(key2);
unregister_code(key1);
}
void press_three_keys(uint16_t key1, uint16_t key2, uint16_t key3) {
register_code(key1);
register_code(key2);
register_code(key3);
unregister_code(key3);
unregister_code(key2);
unregister_code(key1);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case MY_BELW:
if (record->event.pressed) {
press_two_keys(KC_LGUI, KC_RGHT);
press_key(KC_ENT);
}
return false;
case MY_ABVE:
if (record->event.pressed) {
press_two_keys(KC_LGUI, KC_LEFT);
press_key(KC_ENT);
press_key(KC_UP);
}
return false;
case MY_TERM:
if (record->event.pressed) {
press_three_keys(KC_LGUI, KC_LSFT, KC_ENT);
}
return false;
case MY_DEQL: // /=
if (record->event.pressed) {
press_key(KC_SLSH);
press_key(KC_EQL);
}
return false;
case MY_MEQL: // *=
if (record->event.pressed) {
press_two_keys(KC_LSFT, KC_ASTR);
press_key(KC_EQL);
}
return false;
case MY_SEQL: // -=
if (record->event.pressed) {
press_key(KC_MINS);
press_key(KC_EQL);
}
return false;
case MY_PEQL: // +=
if (record->event.pressed) {
press_two_keys(KC_LSFT, KC_PLUS);
press_key(KC_EQL);
}
return false;
case MY_NEQL: // !=
if (record->event.pressed) {
press_two_keys(KC_LSFT, KC_EXLM);
press_key(KC_EQL);
}
return false;
case MY_LTGT: // <>
if (record->event.pressed) {
press_two_keys(KC_LSFT, KC_LABK);
press_two_keys(KC_LSFT, KC_RABK);
}
return false;
case MY_DPIP: // ||
if (record->event.pressed) {
press_two_keys(KC_LSFT, KC_PIPE);
press_two_keys(KC_LSFT, KC_PIPE);
}
return false;
case MY_DAMP: // &&
if (record->event.pressed) {
press_two_keys(KC_LSFT, KC_AMPR);
press_two_keys(KC_LSFT, KC_AMPR);
}
return false;
}
return true;
}

View File

@ -61,7 +61,7 @@ doing sundry experimentation:
interesting idea to express the maps rotated 90%, so that you
only need to fit 4 symbols onto each line, rather than 12.
I used enums to manage layer IDs and macro IDs so that I don't need
I use enums to manage layer IDs and macro IDs so that I don't need
to care (beyond "start at 0", and arguably even that's not needed)
about their values.
@ -102,12 +102,21 @@ unwise things again...
* I use tmux quite a lot; the mollat keymap seems to have some
interesting helpers. It might be interesting to add a "tmux
layer," or to have a few keys in a layer oriented towards that
- Keys for...
- Picking windows 0 thru 8
- next/prev/new window
* The mollat tmux layer also suggests some thoughts about Emacs
helpers.
helpers.
* I do not presently have anything that handles X11 screen
switching, as with Control-Alt-various
* I ought to probably look into KC_LEAD, to have some key combos
that do not need to be concurrent
* The jeebak keymap seems to have some neat ideas:
- Number layer which is aggressive about having numbers in several places
- Touch layer seems interesting
- TouchCursor layer seems interesting
- It sets up a layer with cursor keys on the home keys
* The jeremy-dev keymap has some very interesting concepts
- Shift hands outwards; the special keys go in the center
- Symbol layer has some compound keys for C operators like /=, *=, -=, +=, ...
- This is likely what I'll use for my XD75re, and maybe I'll fork a
planck keymap for similar

View File

@ -1,5 +1,3 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically

View File

@ -1,18 +0,0 @@
# Copyright 2013 Jun Wako <wakojun@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/>.
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif

View File

@ -0,0 +1,38 @@
# Copyright 2013 Jun Wako <wakojun@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/>.
# QMK Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # 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
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
API_SYSEX_ENABLE = no # Enable SYSEX API (+5390)
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@ -0,0 +1,44 @@
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
*
* 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/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#ifndef NO_DEBUG
#define NO_DEBUG
#endif
#ifndef NO_PRINT
#define NO_PRINT
#endif
#include "../../config.h"
#define LEADER_TIMEOUT 300
#define BACKLIGHT_BREATHING
/* cbbrowne user configuration */
#define randadd 53
#define randmul 181
#define randmod 167
/* Filler to make layering a bit clearer *
* borrowed from basic keymap */
#define _______ KC_TRNS
#define _____ KC_NO
#endif

View File

@ -0,0 +1,297 @@
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
*
* 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 "xd75.h"
/* Fillers to make layering more clear */
#define _______ KC_TRNS
#define ___T___ KC_TRNS
#define XXXXXXX KC_NO
/* Layer shorthand */
enum layers {
_QWERTY = 0, /* Qwerty mapping */
_LOWER, /* Lower layer, where top line has symbols !@#$%^&*() */
_RAISE, /* Raised layer, where top line has digits 1234567890 */
_ADJUST, /* Special Adjust layer coming via tri-placement */
_FUNCTION /* Function key layer */
};
/* Macros need to be uniquely identified; using an enum to do this
automatically
*/
enum macro_id {
M_LED = 0,
M_USERNAME,
M_RANDDIGIT,
M_RANDLETTER,
M_VERSION,
MACRO_UPPER,
MACRO_LOWER,
};
/* I want some short forms for keycodes so that they fit into
limited-width cells */
#define M_LOWER M(MACRO_LOWER)
#define M_UPPER M(MACRO_UPPER)
#define ROT_LED M(M_LED) /* Rotate LED */
#define QWERTY DF(_QWERTY) /* Switch to QWERTY layout */
#define QCENT2 DF(_QCENT2) /* Switch to QWERTY-with-centre layout */
#define USERNAME M(M_USERNAME) /* shortcut for username */
#define RANDDIG M(M_RANDDIGIT)
#define RANDALP M(M_RANDLETTER)
#define CTLENTER MT(MOD_RCTL, KC_ENT)
#define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT)
#define ALTRIGHT MT(MOD_LALT, KC_RGHT)
#define MVERSION M(M_VERSION)
#define ALTSLASH LALT(KC_SLSH)
#define FUNCTION MO(_FUNCTION)
#define MRAISE MO(_RAISE)
#define MLOWER MO(_LOWER)
#define ALTBSP ALT_T(KC_BSPC)
/* More modifiers for QCENT2... */
#define PALT MT(KC_RALT, KC_P)
#define SCTL MT(KC_RCTL, KC_SCLN)
#define SSHF MT(KC_RSFT, KC_SLSH)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY - MIT ENHANCED / GRID COMPATIBLE
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
/* layout for centred keypad + qwerty...
|ESC| 1 | 2 | 3 | 4 | 5 | ? | ? | ? | ? | 6 | 7 | 8 | 9 | 0 |
|TAB| q | w | e | r | t | ? | ? | ? | ? | y | u | i | o | p |
|CTL| a | s | d | f | g | ? | ? | ? | ? | h | j | k | l | ; |
|SHF| z | x | c | v | b | ? | ? | ? | ? | n | m | , | . | / |
|ALT|LED| | | | | | | | | | | | | |
keys needing to be assigned:
11 - KC_TAB - tab
52 - ROT_LED - rotate LED
15 - KC_LALT - Left ALT
- KC_LGUI - this is the windows/command key, which I think I do not use...
- M_LOWER - switch to LOWER layer
- KC_SPC - space
- M_UPPER - switch to UPPER layer, maybe unneeded for 15x5
- KC_LEFT - famous arrows
- KC_DOWN - famous arrows
- KC_UP - famous arrows
- KC_RIGHT - famous arrows
- KC_ENT - enter
- KC_GRV - leftwards quote
- KC_QUOT - rightwards quote
- KC_BSPC - backspace
- KC_ESC
Missing still...
KC_LBRC and KC_LCBR
KC_RBRC and KC_RCBR
*/
[_QWERTY] = { /* QWERTY, with keypad in the centre */
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, RESET, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC },
{ KC_LALT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PLUS },
{ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_4, KC_5, KC_MINS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_1, KC_2, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE },
{ KC_TAB, FUNCTION, MRAISE, FUNCTION, MRAISE, KC_SPC, KC_0, KC_MINS, KC_SPC, KC_SPC, MLOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }
},
/* LOWER
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | XXXXXX . | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_LOWER] = { /* LOWERED */
{ ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 },
{ ___T___, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS },
{ ___T___, 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, _______, _______, _______, _______, _______, ___T___, ___T___, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
},
/* RAISED
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | XXXXXX . | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_RAISE] = { /* RAISED */
{ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ },
{ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_INS },
{ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___ },
{ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
},
/* FUNCTION
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX . | MOUS Un | WHEEL- |
* |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------|
* | RESET | | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_FUNCTION] = { /* FUNCTION */
{ KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ },
{ KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR },
{ KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U },
{ RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, ___T___, ___T___, KC_MS_U, KC_WH_D },
{ RESET , _______, DF(_QWERTY), DF(_QWERTY), DF(_QWERTY), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R },
},
};
const uint16_t PROGMEM fn_actions[] = {
};
/* This bit of logic seeds a wee linear congruential random number generator */
/* lots of prime numbers everywhere... */
static uint16_t random_value = 157;
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
uint8_t clockbyte=0;
clockbyte = TCNT1 % 256;
uint8_t rval;
/* MACRODOWN only works in this function */
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
} else {
unregister_code(KC_RSFT);
}
break;
case M_USERNAME:
if (record->event.pressed) {
SEND_STRING("cbbrowne");
}
break;
case M_VERSION:
if (record->event.pressed) {
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@");
// SEND_STRING(QMK_VERSION "@" QMK_BUILDDATE);
}
break;
case M_RANDDIGIT:
/* Generate, based on random number generator, a keystroke for
a numeric digit chosen at random */
random_value = ((random_value + randadd) * randmul) % randmod;
if (record->event.pressed) {
/* Here, we mix the LCRNG with low bits from one of the system
clocks via XOR in the theory that this may be more random
than either separately */
rval = (random_value ^ clockbyte) % 10;
/* Note that KC_1 thru KC_0 are a contiguous range */
register_code (KC_1 + rval);
unregister_code (KC_1 + rval);
}
break;
case M_RANDLETTER:
/* Generate, based on random number generator, a keystroke for
a letter chosen at random */
/* Here, we mix the LCRNG with low bits from one of the system
clocks via XOR in the theory that this may be more random
than either separately */
random_value = ((random_value + randadd) * randmul) % randmod;
if (record->event.pressed) {
rval = (random_value ^ clockbyte) % 26;
register_code (KC_A + rval);
unregister_code (KC_A + rval);
}
break;
case MACRO_UPPER:
if (record->event.pressed)
{
layer_on(_RAISE);
#ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
#endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
else
{
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
case MACRO_LOWER:
if (record->event.pressed)
{
layer_on(_LOWER);
#ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
#endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
else
{
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
}
return MACRO_NONE;
};

View File

@ -0,0 +1,22 @@
cbbrowne custom keyboard
==============================
Due to cbbrowne@acm.org
Christopher Browne
Much of this is copied from my Planck keymap...
1. TODO
--------------------------------------------------
* Set up keypad in the middle of the screen?
* Or perhaps I should set up a layer for that?
* Need the Random, version, my name keys
* Almost certainly I want shift/control/alt on the right side,
superimposed on whatever is at the rightmost end
* Need a good place for RESET
* Definitely want the keyboard to "breathe"
* Perhaps nice to have some programming constructs as in jeremy-dev
- It had C operators such as /=, *=, -=, +=, ...
* Should I have some tmux commands like in mollat?
* How about adding some emacs commands?

View File

@ -9,22 +9,40 @@ For more info on this firmware (and how to make it your own), head over to [qmk.
## Building
Download or clone the whole firmware and navigate to the keyboards/xd75 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
Depending on which keymap you would like to use, you will have to compile slightly differently.
Download or clone the whole firmware and navigate to the
keyboards/xd75 folder. Once your dev env is setup, you'll be able to
type `make` to generate your .hex - you can then use the Teensy Loader
to install the resulting .hex file, or have the `make` process install
it using DFU.
### Default
To build with the default keymap, simply run `make default`.
To build with the default keymap, simply run `make xd75-default`, and
to install via DFU, `make xd75-default-dfu`.
Note that DFU is likely to require root permissions, so installing the
firmware likely requires a command line like:
```
$ sudo make xd75-default-dfu
```
### Other Keymaps
The "default" keymap included is basically the OLKB Atomic keymap with a few buttons added for RGB underglow control. This should be usable as a starting point, but most people will be best served creating their own keymap and flashing it - more info on creating your own keymap is available in [the official QMK documentation](https://docs.qmk.fm).
The "default" keymap included is basically the OLKB Atomic keymap with
a few buttons added for RGB underglow control. This should be usable
as a starting point, but most people will be best served creating
their own keymap and flashing it - more info on creating your own
keymap is available in [the official QMK
documentation](https://docs.qmk.fm).
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
Keymaps follow the format **__\<name\>.c__** and are stored in
subdirectories under `keyboards/xd75/keymaps`
To build the firmware binary hex file for a specific keymap, and
install it, using DFU, just do `make` with a keymap like this:
```
$ make [default|jack|<name>]
$ make xd75-[default|<name>]
```
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.