summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md17
-rw-r--r--common/avr/suspend.c27
-rw-r--r--common/command.c12
-rw-r--r--common/suspend.h2
-rw-r--r--converter/adb_usb/README.md2
-rw-r--r--doc/keycode.txt2
-rw-r--r--doc/other_projects.md1
-rw-r--r--keyboard/ghost_squid/Makefile.lufa117
-rw-r--r--keyboard/ghost_squid/README.md20
-rw-r--r--keyboard/ghost_squid/config.h43
-rw-r--r--keyboard/ghost_squid/keymap.c102
-rw-r--r--keyboard/ghost_squid/keymap_ansi.h23
-rw-r--r--keyboard/ghost_squid/led.c (renamed from keyboard/hhkb_rn42/led.c)45
-rw-r--r--keyboard/ghost_squid/matrix.c237
-rw-r--r--keyboard/hhkb/Makefile.rn42 (renamed from keyboard/hhkb_rn42/Makefile)22
-rw-r--r--keyboard/hhkb/README.md17
-rw-r--r--keyboard/hhkb/config_rn42.h (renamed from keyboard/hhkb_rn42/config.h)0
-rw-r--r--keyboard/hhkb/hhkb_avr.h28
-rw-r--r--keyboard/hhkb/keymap_hasu.c34
-rw-r--r--keyboard/hhkb/matrix.c27
-rw-r--r--keyboard/hhkb/not_supported/Makefile.iwrap (renamed from keyboard/hhkb/Makefile.iwrap)0
-rw-r--r--keyboard/hhkb/not_supported/Makefile.vusb (renamed from keyboard/hhkb/Makefile.vusb)0
-rw-r--r--keyboard/hhkb/not_supported/config_iwrap.h (renamed from keyboard/hhkb/config_iwrap.h)0
-rw-r--r--keyboard/hhkb/not_supported/config_vusb.h (renamed from keyboard/hhkb/config_vusb.h)0
-rw-r--r--keyboard/hhkb/not_supported/iwrap.txt (renamed from keyboard/hhkb/iwrap.txt)0
-rw-r--r--keyboard/hhkb/not_supported/usbconfig.h (renamed from keyboard/hhkb/usbconfig.h)0
-rw-r--r--keyboard/hhkb/rn42.mk (renamed from keyboard/hhkb_rn42/rn42.mk)0
-rw-r--r--keyboard/hhkb/rn42/MEMO.txt255
-rw-r--r--keyboard/hhkb/rn42/PowerSave.txt (renamed from keyboard/hhkb_rn42/PowerSave.txt)64
-rw-r--r--keyboard/hhkb/rn42/RN42.txt408
-rw-r--r--keyboard/hhkb/rn42/battery.c (renamed from keyboard/hhkb_rn42/rn42/battery.c)20
-rw-r--r--keyboard/hhkb/rn42/battery.h (renamed from keyboard/hhkb_rn42/rn42/battery.h)0
-rw-r--r--keyboard/hhkb/rn42/main.c (renamed from keyboard/hhkb_rn42/rn42/main.c)19
-rw-r--r--keyboard/hhkb/rn42/rn42.c (renamed from keyboard/hhkb_rn42/rn42/rn42.c)31
-rw-r--r--keyboard/hhkb/rn42/rn42.h (renamed from keyboard/hhkb_rn42/rn42/rn42.h)3
-rw-r--r--keyboard/hhkb/rn42/rn42_task.c478
-rw-r--r--keyboard/hhkb/rn42/rn42_task.h (renamed from keyboard/hhkb_rn42/rn42/rn42_task.h)0
-rw-r--r--keyboard/hhkb/rn42/suart.S (renamed from keyboard/hhkb_rn42/rn42/suart.S)0
-rw-r--r--keyboard/hhkb/rn42/suart.h (renamed from keyboard/hhkb_rn42/rn42/suart.h)0
-rw-r--r--keyboard/hhkb_rn42/MEMO.txt523
-rw-r--r--keyboard/hhkb_rn42/hhkb_avr.h164
-rw-r--r--keyboard/hhkb_rn42/keymap_common.h84
-rw-r--r--keyboard/hhkb_rn42/keymap_hasu.c282
-rw-r--r--keyboard/hhkb_rn42/keymap_jp.c50
-rw-r--r--keyboard/hhkb_rn42/matrix.c191
-rw-r--r--keyboard/hhkb_rn42/rn42/rn42_task.c294
-rw-r--r--keyboard/infinity/Makefile7
-rw-r--r--keyboard/infinity/config.h4
-rw-r--r--keyboard/infinity/keymap.c3
-rw-r--r--keyboard/infinity/keymap_common.h28
-rw-r--r--keyboard/nerd/Makefile (renamed from keyboard/hhkb/Makefile.nodebug)53
-rw-r--r--keyboard/nerd/README.md52
-rw-r--r--keyboard/nerd/backlight.c81
-rw-r--r--keyboard/nerd/backlight.h40
-rw-r--r--keyboard/nerd/config.h49
-rw-r--r--keyboard/nerd/keymap_60_ansi150.c30
-rw-r--r--keyboard/nerd/keymap_80_ansi150.c33
-rw-r--r--keyboard/nerd/keymap_common.c (renamed from keyboard/hhkb_rn42/keymap_common.c)6
-rw-r--r--keyboard/nerd/keymap_common.h89
-rw-r--r--keyboard/nerd/matrix.c221
-rw-r--r--protocol/adb.c2
-rw-r--r--protocol/bluefruit/main.c2
-rw-r--r--protocol/lufa/lufa.c41
-rw-r--r--protocol/pjrc/main.c2
64 files changed, 2604 insertions, 1783 deletions
diff --git a/README.md b/README.md
index e077fc928d..dd03e1403d 100644
--- a/README.md
+++ b/README.md
@@ -54,6 +54,15 @@ You can find some keyboard specific projects under `converter` and `keyboard` di
* [KMAC](keyboard/kmac/) - Korean custom keyboard
* [Lightsaber](keyboard/lightsaber/) - Korean custom keyboard
* [Infinity](keyboard/infinity/) - Massdrop [Infinity keyboard][Infinity]
+* [NerD](keyboard/nerd/) - Korean custom keyboard
+* [KittenPaw](keyboard/kitten_paw) - Custom Majestouch controller
+* [Lightpad](keyboard/lightpad) - Korean custom keypad
+* [ghost_squid](keyboard/ghost_squid/) - [The Ghost Squid][ghost_squid] controller for [Cooler Master QuickFire XT][cmxt]
+
+### Extenal projects using tmk_keyboard
+* [ErgoDox_cub-uanic][cub-uanic] - Split Ergonomic Keyboard [ErgoDox][ergodox_org]
+* [mcdox][mcdox_tmk] - [mcdox][mcdox]
+
[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930
[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
@@ -74,6 +83,12 @@ You can find some keyboard specific projects under `converter` and `keyboard` di
[Sun]: http://en.wikipedia.org/wiki/Sun-3
[IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS
[Infinity]: https://www.massdrop.com/buy/infinity-keyboard-kit
+[ghost_squid]: http://deskthority.net/wiki/Costar_replacement_controllers#The_Ghost_Squid
+[cmxt]: http://gaming.coolermaster.com/en/products/keyboards/quickfirext/
+[ergodox_org]: http://ergodox.org/
+[cub-uanic]: https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox
+[mcdox]: https://github.com/DavidMcEwan/mcdox
+[mcdox_tmk]: https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox
@@ -278,4 +293,4 @@ Coding Style
Other Keyboard Firmware Projects
------------------
-See [doc/other_projects.md](doc/other_projects.md).
+You can learn a lot about keyboard firmware from these. See [doc/other_projects.md](doc/other_projects.md).
diff --git a/common/avr/suspend.c b/common/avr/suspend.c
index 66a579fd78..80243f02bc 100644
--- a/common/avr/suspend.c
+++ b/common/avr/suspend.c
@@ -7,6 +7,7 @@
#include "backlight.h"
#include "suspend_avr.h"
#include "suspend.h"
+#include "timer.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#endif
@@ -52,11 +53,13 @@ void suspend_idle(uint8_t time)
* WDTO_4S
* WDTO_8S
*/
-void suspend_power_down(uint8_t wdto)
+static uint8_t wdt_timeout = 0;
+static void power_down(uint8_t wdto)
{
#ifdef PROTOCOL_LUFA
if (USB_DeviceState == DEVICE_STATE_Configured) return;
#endif
+ wdt_timeout = wdto;
// Watchdog Interrupt Mode
wdt_intr_enable(wdto);
@@ -67,7 +70,6 @@ void suspend_power_down(uint8_t wdto)
// - prescale clock
// - BOD disable
// - Power Reduction Register PRR
-
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
sei();
@@ -78,6 +80,11 @@ void suspend_power_down(uint8_t wdto)
wdt_disable();
}
+void suspend_power_down(void)
+{
+ power_down(WDTO_15MS);
+}
+
bool suspend_wakeup_condition(void)
{
matrix_power_up();
@@ -103,15 +110,13 @@ void suspend_wakeup_init(void)
/* watchdog timeout */
ISR(WDT_vect)
{
- /* wakeup from MCU sleep mode */
-/*
- // blink LED
- static uint8_t led_state = 0;
- static uint8_t led_count = 0;
- led_count++;
- if ((led_count & 0x07) == 0) {
- led_set((led_state ^= (1<<USB_LED_CAPS_LOCK)));
+ // compensate timer for sleep
+ switch (wdt_timeout) {
+ case WDTO_15MS:
+ timer_count += 15 + 2; // WDTO_15MS + 2(from observation)
+ break;
+ default:
+ ;
}
-*/
}
#endif
diff --git a/common/command.c b/common/command.c
index 1a507e3a46..fbaa9f2d75 100644
--- a/common/command.c
+++ b/common/command.c
@@ -303,7 +303,7 @@ static bool command_common(uint8_t code)
#endif
" " STR(BOOTLOADER_SIZE) "\n");
- print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__)
+ print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__)
" AVR-LIBC: " __AVR_LIBC_VERSION_STRING__
" AVR_ARCH: avr" STR(__AVR_ARCH__) "\n");
break;
@@ -542,12 +542,12 @@ static void mousekey_console_help(void)
print("4: select mk_time_to_max\n");
print("5: select mk_wheel_max_speed\n");
print("6: select mk_wheel_time_to_max\n");
- print("p: print prameters\n");
+ print("p: print parameters\n");
print("d: set default values\n");
- print("up: increase prameters(+1)\n");
- print("down: decrease prameters(-1)\n");
- print("pgup: increase prameters(+10)\n");
- print("pgdown: decrease prameters(-10)\n");
+ print("up: increase parameters(+1)\n");
+ print("down: decrease parameters(-1)\n");
+ print("pgup: increase parameters(+10)\n");
+ print("pgdown: decrease parameters(-10)\n");
print("\nspeed = delta * max_speed * (repeat / time_to_max)\n");
print("where delta: cursor="); pdec(MOUSEKEY_MOVE_DELTA);
print(", wheel="); pdec(MOUSEKEY_WHEEL_DELTA); print("\n");
diff --git a/common/suspend.h b/common/suspend.h
index f339c670ac..80617a8244 100644
--- a/common/suspend.h
+++ b/common/suspend.h
@@ -6,7 +6,7 @@
void suspend_idle(uint8_t timeout);
-void suspend_power_down(uint8_t timeout);
+void suspend_power_down(void);
bool suspend_wakeup_condition(void);
void suspend_wakeup_init(void);
diff --git a/converter/adb_usb/README.md b/converter/adb_usb/README.md
index defc477e2c..21ad318c1d 100644
--- a/converter/adb_usb/README.md
+++ b/converter/adb_usb/README.md
@@ -88,7 +88,7 @@ modifiers except for GUI key(Windows/Command).
And most ADB keyboard has no diodes in its matrix so they are not NKRO,
though ADB protocol itself supports it. See protocol/adb.c for more info.
-If keyobard has ISO layout you need to use ISO keymap with `make KEYMAP=iso`. With ANSI
+If keyboard has ISO layout you need to use ISO keymap with `make KEYMAP=iso`. With ANSI
keymap you will suffer from swapped keys problem.
https://github.com/tmk/tmk_keyboard/issues/35
diff --git a/doc/keycode.txt b/doc/keycode.txt
index 4137566924..760c726e3b 100644
--- a/doc/keycode.txt
+++ b/doc/keycode.txt
@@ -81,7 +81,7 @@ KC_F12 45 Keyboard F12
KC_PSCREEN KC_PSCR 46 Keyboard PrintScreen1
KC_SCKLOCK KC_SLCK 47 Keyboard Scroll Lock11
KC_PAUSE KC_PAUS 48 Keyboard Pause1
-KC_INSERT KC_INT 49 Keyboard Insert1
+KC_INSERT KC_INS 49 Keyboard Insert1
KC_HOME 4A Keyboard Home1
KC_PGUP 4B Keyboard PageUp1
KC_DELETE KC_DELETE 4C Keyboard Delete Forward
diff --git a/doc/other_projects.md b/doc/other_projects.md
index ce24e0ab5c..bf980b0a9e 100644
--- a/doc/other_projects.md
+++ b/doc/other_projects.md
@@ -29,6 +29,7 @@ Other Keyboard Firmware Projects
## ErgoDox[Ergo][Split][USB][AVR]
- <http://geekhack.org/index.php?topic=22780.0>
- <https://github.com/benblazak/ergodox-firmware>
+- <https://github.com/cub-uanic/tmk_keyboard>
## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR]
- <http://deskthority.net/workshop-f7/my-diy-keyboard-collection-or-how-i-became-a-kb-geek-t2534.html>
diff --git a/keyboard/ghost_squid/Makefile.lufa b/keyboard/ghost_squid/Makefile.lufa
new file mode 100644
index 0000000000..61893893a4
--- /dev/null
+++ b/keyboard/ghost_squid/Makefile.lufa
@@ -0,0 +1,117 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make coff = Convert ELF to AVR COFF.
+#
+# make extcoff = Convert ELF to AVR Extended COFF.
+#
+# make program = Download the hex file to the device.
+# Please customize your programmer settings(PROGRAM_CMD)
+#
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+# (must have teensy_loader_cli installed).
+#
+# make dfu = Download the hex file to the device, using dfu-programmer (must
+# have dfu-programmer installed).
+#
+# make flip = Download the hex file to the device, using Atmel FLIP (must
+# have Atmel FLIP installed).
+#
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
+# (must have dfu-programmer installed).
+#
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
+# (must have Atmel FLIP installed).
+#
+# make debug = Start either simulavr or avarice as specified for debugging,
+# with avr-gdb or avr-insight as the front end for debugging.
+#
+# make filename.s = Just compile filename.c into the assembler code only.
+#
+# make filename.i = Create a preprocessed source file for use in submitting
+# bug reports to the GCC project.
+#
+# To rebuild project do "make clean" then "make all".
+#----------------------------------------------------------------------------
+
+# Target file name (without extension).
+TARGET = ghostsquid_lufa
+
+# Directory common source filess exist
+TOP_DIR = ../..
+
+# Directory keyboard dependent files exist
+TARGET_DIR = .
+
+# List C source files here. (C dependencies are automatically generated.)
+SRC = keymap.c \
+ matrix.c \
+ led.c
+
+CONFIG_H = config.h
+
+# MCU name
+MCU = atmega32u2
+
+# 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)
+
+
+# Build Options
+# comment out to disable the options.
+#
+#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+#CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
+
+
+# Boot Section Size in bytes
+# Teensy halfKay 512
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Search Path
+VPATH += $(TARGET_DIR)
+VPATH += $(TOP_DIR)
+
+include $(TOP_DIR)/protocol/lufa.mk
+include $(TOP_DIR)/common.mk
+include $(TOP_DIR)/rules.mk
diff --git a/keyboard/ghost_squid/README.md b/keyboard/ghost_squid/README.md
new file mode 100644
index 0000000000..dda67e6ba1
--- /dev/null
+++ b/keyboard/ghost_squid/README.md
@@ -0,0 +1,20 @@
+The Ghost Squid controller
+==========================
+Custom controller for the Cooler Master QuickFire XT keyboard designed by bpiphany.
+
+*Note that this is not the official firmware*
+
+Build
+-----
+Move to this directory then just run `make` like:
+
+ $ make -f Makefile.lufa
+
+At the moment only the LUFA stack is supported.
+
+
+Bootloader
+---------
+To enter bootloader by hardware use a magnet above the controller before connecting the usb cable.
+
+It is still possible to use Boot Magic and Command (LSFT+RSFT+PAUS) to access the bootloader though.
diff --git a/keyboard/ghost_squid/config.h b/keyboard/ghost_squid/config.h
new file mode 100644
index 0000000000..54f03143c1
--- /dev/null
+++ b/keyboard/ghost_squid/config.h
@@ -0,0 +1,43 @@
+/*
+Copyright 2014 Ralf Schmitt <ralf@bunkertor.net>
+
+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_H
+#define CONFIG_H
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED // 0x2516 (original CM XT value)
+#define PRODUCT_ID 0x001A
+#define DEVICE_VER 0x0000
+#define MANUFACTURER Cooler Master
+#define PRODUCT Cooler Master QuickFire XT
+
+/* message strings */
+#define DESCRIPTION t.m.k. keyboard firmware for Cooler Master QuickFire XT
+
+/* matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 18
+
+/* Set 0 if need no debouncing */
+#define DEBOUNCE 5
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+#endif
diff --git a/keyboard/ghost_squid/keymap.c b/keyboard/ghost_squid/keymap.c
new file mode 100644
index 0000000000..e9ad9efe1a
--- /dev/null
+++ b/keyboard/ghost_squid/keymap.c
@@ -0,0 +1,102 @@
+/*
+Copyright 2014 Ralf Schmitt <ralf@bunkertor.net>
+
+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 <stdint.h>
+#include <stdbool.h>
+#include <avr/pgmspace.h>
+#include "keycode.h"
+#include "action.h"
+#include "action_macro.h"
+#include "report.h"
+#include "host.h"
+#include "debug.h"
+#include "keymap.h"
+
+/*
+ Matrix col/row mapping
+
+ ,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
+ |06/6| |07/4|08/4|08/2|08/6| |15/5|11/6|12/2|12/4| |14/4|14/5|14/6|14/0| |13/5|13/7|15/7|
+ `----' `-------------------' `-------------------' `-------------------' `--------------'
+ ,-------------------------------------------------------------------------. ,--------------. ,-------------------.
+ |06/4|06/5|07/5|08/5|09/5|09/4|10/4|10/5|11/5|12/5|05/5|05/4|11/4| 14/2| |17/4|02/4|04/4| |16/1|17/1|04/1|04/0|
+ |-------------------------------------------------------------------------| |--------------| |-------------------|
+ |06/2 |06/7|07/7|08/7|09/7|09/2|10/2|10/7|11/7|12/7|05/7|05/2|11/2| 14/3| |16/4|02/5|04/5| |16/7|17/7|04/7| |
+ |-------------------------------------------------------------------------| '--------------' |-------------- 02/7|
+ |02/7 |06/3|07/3|08/3|09/3|09/6|10/6|10/3|11/3|12/3|05/3|05/6| 14/1| |16/2|17/2|04/2| |
+ |-------------------------------------------------------------------------| ,----. |-------------------|
+ |01/2 |06/1|07/1|08/1|09/1|09/0|10/0|10/1|11/1|12/1|05/0| 01/3| |02/6| |16/3|17/3|04/3| |
+ |-------------------------------------------------------------------------| ,--------------. |-------------- 02/3|
+ |15/4|03/2|13/6| 16/6 |13/0|0/3|12/0|15/1| |02/0|16/0|17/0| | 17/6 |04/6| |
+ `-------------------------------------------------------------------------' `--------------' `-------------------'
+*/
+
+#define KEYMAP( \
+ KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \
+ KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, KQ1, KR1, KE1, KE0, \
+ KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, KQ7, KR7, KE7, KC7, \
+ KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, KQ2, KR2, KE2, \
+ KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, KQ3, KR3, KE3, KC3, \
+ KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0, KR6, KE6 \
+) { \
+/* 0 1 2 3 4 5 6 7 */ \
+/* A 0 */ {KC_NO, KC_NO, KC_NO, KC_##KA3, KC_NO, KC_NO, KC_NO, KC_NO },\
+/* B 1 */ {KC_NO, KC_NO, KC_##KB2, KC_##KB3, KC_NO, KC_NO, KC_NO, KC_NO },\
+/* C 2 */ {KC_##KC0, KC_NO, KC_NO, KC_##KC3, KC_##KC4, KC_##KC5, KC_##KC6, KC_##KC7},\
+/* D 3 */ {KC_NO, KC_NO, KC_##KD2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO },\
+/* E 4 */ {KC_##KE0, KC_##KE1, KC_##KE2, KC_##KE3, KC_##KE4, KC_##KE5, KC_##KE6, KC_##KE7},\
+/* F 5 */ {KC_##KF0, KC_NO, KC_##KF2, KC_##KF3, KC_##KF4, KC_##KF5, KC_##KF6, KC_##KF7},\
+/* G 6 */ {KC_NO, KC_##KG1, KC_##KG2, KC_##KG3, KC_##KG4, KC_##KG5, KC_##KG6, KC_##KG7},\
+/* H 7 */ {KC_NO, KC_##KH1, KC_##KH2, KC_##KH3, KC_##KH4, KC_##KH5, KC_##KH6, KC_##KH7},\
+/* I 8 */ {KC_NO, KC_##KI1, KC_##KI2, KC_##KI3, KC_##KI4, KC_##KI5, KC_##KI6, KC_##KI7},\
+/* J 9 */ {KC_##KJ0, KC_##KJ1, KC_##KJ2, KC_##KJ3, KC_##KJ4, KC_##KJ5, KC_##KJ6, KC_##KJ7},\
+/* K 10 */ {KC_##KK0, KC_##KK1, KC_##KK2, KC_##KK3, KC_##KK4, KC_##KK5, KC_##KK6, KC_##KK7},\
+/* L 11 */ {KC_NO, KC_##KL1, KC_##KL2, KC_##KL3, KC_##KL4, KC_##KL5, KC_##KL6, KC_##KL7},\
+/* M 12 */ {KC_##KM0, KC_##KM1, KC_##KM2, KC_##KM3, KC_##KM4, KC_##KM5, KC_NO, KC_##KM7},\
+/* N 13 */ {KC_##KN0, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KN5, KC_##KN6, KC_##KN7},\
+/* O 14 */ {KC_##KO0, KC_##KO1, KC_##KO2, KC_##KO3, KC_##KO4, KC_##KO5, KC_##KO6, KC_NO },\
+/* P 15 */ {KC_NO, KC_##KP1, KC_NO, KC_NO, KC_##KP4, KC_##KP5, KC_NO, KC_##KP7},\
+/* Q 16 */ {KC_##KQ0, KC_##KQ1, KC_##KQ2, KC_##KQ3, KC_##KQ4, KC_NO, KC_##KQ6, KC_##KQ7},\
+/* R 17 */ {KC_##KR0, KC_##KR1, KC_##KR2, KC_##KR3, KC_##KR4, KC_NO, KC_##KR6, KC_##KR7} \
+}
+
+#include "keymap_ansi.h"
+
+#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0]))
+#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
+
+/* translates key to keycode */
+uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
+{
+ if (layer < KEYMAPS_SIZE) {
+ return pgm_read_byte(&keymaps[(layer)][(key.col)][(key.row)]);
+ } else {
+ return pgm_read_byte(&keymaps[0][(key.col)][(key.row)]);
+ }
+}
+
+/* translates Fn keycode to action */
+action_t keymap_fn_to_action(uint8_t keycode)
+{
+ action_t action;
+ if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) {
+ action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]);
+ } else {
+ action.code = ACTION_NO;
+ }
+ return action;
+}
diff --git a/keyboard/ghost_squid/keymap_ansi.h b/keyboard/ghost_squid/keymap_ansi.h
new file mode 100644
index 0000000000..ed1088baa9
--- /dev/null
+++ b/keyboard/ghost_squid/keymap_ansi.h
@@ -0,0 +1,23 @@
+
+static const uint8_t PROGMEM keymaps[][MATRIX_COLS][MATRIX_ROWS] = {
+ /* Layer 0: Standard ANSI layer */
+ KEYMAP(\
+ ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, \
+ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, \
+ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, \
+ CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, \
+ LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT,