Last active
April 13, 2020 18:32
-
-
Save cxw42/67e870bd2f67f9a525b1e53a8b244af4 to your computer and use it in GitHub Desktop.
Keyboard.io Model01 Colormap file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Modified from Model01-sketch/tools/colormap/apply by Gergely Nagy | |
# (algernon), | |
# https://github.com/algernon/Model01-sketch/blob/master/tools/colormap/apply , | |
# licensed GPL3. | |
here="$(cd "$(dirname "$0")" &>/dev/null ; pwd)" | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: $0 <colormap filename>" | |
exit 1 | |
fi | |
mapfile="$1" | |
if [[ ! -r "$mapfile" ]]; then | |
echo "Cannot read specified file" | |
exit 1 | |
fi | |
clean_command () { | |
sed -e "s,#.*,," | |
} | |
focus="$here/focus" | |
grep -v '^#' "$mapfile" | clean_command | DEVICE=/dev/ttyACM0 xargs "$focus" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colormap.map | |
# Layout: | |
# | |
# Left side: | |
# Starting from pgdn, up column 1, down column 2, &c., ending up column 7. | |
# Then across the thumb L-R, then the pad. | |
# | |
# Right side: | |
# Pad, then across the thumb L-R, then, starting from `any`, down column 1, | |
# up column 2, &c., ending down column 7 at `-` | |
####################################### | |
# Primary layer | |
## Left, col 1: pgdn pgup ` prog | |
1 1 1 1 | |
## col 2: 1 q a z | |
1 1 1 1 | |
## col 3: x s w 2 | |
1 1 1 1 | |
## col 4: 3 e d c | |
1 1 1 1 | |
## col 5: v f r 4 | |
1 1 1 1 | |
## col 6: 5 t g b | |
1 1 1 1 | |
## col 7: esc tab led | |
1 1 1 | |
## Left thumb: ctrl bksp cmd shift | |
1 1 1 1 | |
## Left pad | |
1 | |
## Right pad | |
1 | |
## Right thumb: shift alt space ctrl | |
1 1 1 1 | |
## Right, col 1: any enter butterfly | |
1 1 1 | |
## col 2: n h y 6 | |
1 1 1 1 | |
## col 3: 7 u j m | |
1 1 1 1 | |
## col 4: , k i 8 | |
1 1 1 1 | |
## col 5: 9 o l . | |
1 1 1 1 | |
## col 6: / ; p 0 | |
1 1 1 1 | |
## col 7: num = ' - | |
1 1 1 1 | |
####################################### | |
# Numpad | |
## Left, col 1: pgdn pgup ` prog | |
1 1 1 1 | |
## col 2: 1 q a z | |
1 1 1 1 | |
## col 3: x s w 2 | |
1 1 1 1 | |
## col 4: 3 e d c | |
1 1 1 1 | |
## col 5: v f r 4 | |
1 1 1 1 | |
## col 6: 5 t g b | |
1 1 1 1 | |
## col 7: esc tab led | |
1 1 1 | |
## Left thumb: ctrl bksp cmd shift | |
1 1 1 1 | |
## Left pad | |
1 | |
## Right pad | |
1 | |
## Right thumb: shift alt space ctrl | |
1 1 1 1 | |
## Right, col 1: any enter butterfly | |
1 1 1 | |
## col 2: n h y 6 | |
1 1 1 1 | |
## col 3: 7 u j m | |
1 1 1 1 | |
## col 4: , k i 8 | |
1 1 1 1 | |
## col 5: 9 o l . | |
1 1 1 1 | |
## col 6: / ; p 0 | |
## Highlight = (white) / + (green) / - (red) | |
1 1 1 1 | |
## col 7: num = ' - | |
## Highlight Num and Enter | |
1 1 1 1 | |
####################################### | |
# Function | |
## Left, col 1: pgdn pgup ` prog | |
1 1 1 1 | |
## col 2: 1 q a z | |
1 1 1 1 | |
## col 3: x s w 2 | |
1 1 1 1 | |
## col 4: 3 e d c | |
1 1 1 1 | |
## col 5: v f r 4 | |
1 1 1 1 | |
## col 6: 5 t g b | |
1 1 1 1 | |
## col 7: esc tab led | |
1 1 1 | |
## Left thumb: ctrl bksp cmd shift | |
1 1 1 1 | |
## Left pad | |
1 | |
## Right pad | |
1 | |
## Right thumb: shift alt space ctrl | |
1 1 1 1 | |
## Right, col 1: any enter butterfly | |
1 1 1 | |
## col 2: n h y 6 | |
1 1 1 1 | |
## col 3: 7 u j m | |
1 1 1 1 | |
## col 4: , k i 8 | |
1 1 1 1 | |
## col 5: 9 o l . | |
1 1 1 1 | |
## col 6: / ; p 0 | |
1 1 1 1 | |
## col 7: num = ' - | |
1 1 1 1 | |
# Copyright (c) 2020 Christopher White (https://github.com/cxw42). | |
# Copying and distribution of this file, with or without modification, are | |
# permitted in any medium without royalty provided the copyright notice and | |
# this notice are preserved. This file is offered as-is, without any warranty. | |
# SPDX-License-Identifier: FSFAP | |
# vi: set ft=perl: # # Just for syntax-highlighting the comments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# focus-test - Trivial Focus testing tool | |
# Copyright (C) 2018 Keyboard.io, Inc. | |
# | |
# 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, version 3. | |
# | |
# 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/>. | |
# Modified from Model01-sketch/tools/focus by Gergely Nagy | |
# (algernon), | |
# https://github.com/algernon/Model01-sketch/blob/master/tools/focus , | |
# licensed GPL3. | |
set -e | |
DEVICE="${DEVICE:-/dev/ttyACM0}" | |
stty -F "${DEVICE}" 9600 raw -echo | |
exec 3<"${DEVICE}" | |
echo "Sending command: " "$@" | |
echo "$@" >"${DEVICE}" | |
echo "Response (if any) follows." | |
while read -r line <&3; do | |
line="$(echo -n "${line}" | tr -d '\r')" | |
if [ "${line}" == "." ]; then | |
break | |
fi | |
echo "${line}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Colormap file for the keyboard.io Model01 running the standard firmware
with the
Colormap
plugin loaded.To use:
colormap.txt
with indices in your palette./apply-file colormap.txt