Skip to content

Commit

Permalink
fc660c: Change default keymap and binary
Browse files Browse the repository at this point in the history
  • Loading branch information
tmk committed Apr 15, 2017
1 parent e382957 commit 22f6cb2
Show file tree
Hide file tree
Showing 7 changed files with 1,285 additions and 71 deletions.
1 change: 0 additions & 1 deletion keyboard/fc660c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ KEYMAP_SECTION_ENABLE ?= yes # fixed address keymap for keymap editor
#
ifeq (yes,$(strip $(UNIMAP_ENABLE)))
KEYMAP_FILE = unimap
TARGET := $(TARGET)_unimap
else
ifeq (yes,$(strip $(ACTIONMAP_ENABLE)))
KEYMAP_FILE = actionmap
Expand Down
1,207 changes: 1,207 additions & 0 deletions keyboard/fc660c/binary/fc660c.hex

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@
:10093000455920434F4E534F4C4520434F4D4D4159
:100940004E44204E4B524F204B45594D41505F5322
:10095000454354494F4E20343039360A00425549F8
:100960004C443A20343466633536612D64697274C0
:1009700079202830343A34303A35382041707220AA
:1009800031312032303137290A005649443A20307B
:100960004C443A20653338323935372D6469727416
:1009700079202831363A31333A32362041707220AC
:1009800031352032303137290A005649443A203077
:10099000784645454428544D4B2E29205049443A29
:1009A00020307836363043284643363630432041AF
:1009B0006C7420436F6E74726F6C6C657229205674
Expand Down
50 changes: 2 additions & 48 deletions keyboard/fc660c/unimap.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
#include "fc660c.h"


#define AC_L3 ACTION_LAYER_MOMENTARY(3)
#define AC_L4 ACTION_LAYER_MOMENTARY(4)
#define AC_LS_2 ACTION_LAYER_MODS(2, MOD_LSFT)
#define AC_RS_2 ACTION_LAYER_MODS(2, MOD_RSFT)
#define AC_TGL1 ACTION_LAYER_TOGGLE(1)

// emulates FC660C default keymap
#ifdef KEYMAP_SECTION_ENABLE
const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
#else
Expand All @@ -19,47 +12,8 @@ const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] PROGMEM = {
[0] = KMAP(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL,
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT,
LS_2,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RS_2,UP,
LCTL,LGUI,LALT, SPC, RALT,RCTL,L3, LEFT,DOWN,RGHT
),
[1] = KMAP(
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL,
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT,
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT,
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT,UP,
LCTL,LGUI,LALT, SPC, RALT,RCTL,L4, LEFT,DOWN,RGHT
),
[2] = KMAP(
GRV, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,
TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS
),
[3] = KMAP(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS,
CAPS,TGL1,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,TRNS,TRNS,TRNS, TRNS,
TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,TRNS,TRNS,HOME,PGUP,TRNS,TRNS, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,END, PGDN,TRNS, TRNS,PGUP,
TRNS,TRNS,TRNS, TRNS, TRNS,APP, L3, HOME,PGDN,END
),
[4] = KMAP(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS,
CAPS,TGL1,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,TRNS,TRNS,TRNS, TRNS,
TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,TRNS,TRNS,HOME,PGUP,TRNS,TRNS, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,END, PGDN,TRNS, TRNS,PGUP,
TRNS,TRNS,TRNS, TRNS, TRNS,APP, L4, HOME,PGDN,END
LCTL,LGUI,LALT, SPC, RALT,RCTL,GRV, LEFT,DOWN,RGHT
),
};


void hook_layer_change(uint32_t layer_state)
{
// lights LED on Insert when layer 1 is enabled
if (layer_state & (1L<<1)) {
PORTB &= ~(1<<5);
} else {
PORTB |= (1<<5);
}
}
65 changes: 65 additions & 0 deletions keyboard/fc660c/unimap_emu.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#include "action.h"
#include "actionmap.h"
#include "hook.h"
#include "fc660c.h"


#define AC_L3 ACTION_LAYER_MOMENTARY(3)
#define AC_L4 ACTION_LAYER_MOMENTARY(4)
#define AC_LS_2 ACTION_LAYER_MODS(2, MOD_LSFT)
#define AC_RS_2 ACTION_LAYER_MODS(2, MOD_RSFT)
#define AC_TGL1 ACTION_LAYER_TOGGLE(1)

// emulates FC660C default keymap
#ifdef KEYMAP_SECTION_ENABLE
const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
#else
const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] PROGMEM = {
#endif
[0] = KMAP(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL,
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT,
LS_2,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RS_2,UP,
LCTL,LGUI,LALT, SPC, RALT,RCTL,L3, LEFT,DOWN,RGHT
),
[1] = KMAP(
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL,
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT,
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT,UP,
LCTL,LGUI,LALT, SPC, RALT,RCTL,L4, LEFT,DOWN,RGHT
),
[2] = KMAP(
GRV, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,
TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS
),
[3] = KMAP(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS,
CAPS,TGL1,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,TRNS,TRNS,TRNS, TRNS,
TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,TRNS,TRNS,HOME,PGUP,TRNS,TRNS, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,END, PGDN,TRNS, TRNS,PGUP,
TRNS,TRNS,TRNS, TRNS, TRNS,APP, L3, HOME,PGDN,END
),
[4] = KMAP(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS,
CAPS,TGL1,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,TRNS,TRNS,TRNS, TRNS,
TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,TRNS,TRNS,HOME,PGUP,TRNS,TRNS, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,END, PGDN,TRNS, TRNS,PGUP,
TRNS,TRNS,TRNS, TRNS, TRNS,APP, L4, HOME,PGDN,END
),
};


void hook_layer_change(uint32_t layer_state)
{
// lights LED on Insert when layer 1 is enabled
if (layer_state & (1L<<1)) {
PORTB &= ~(1<<5);
} else {
PORTB |= (1<<5);
}
}
19 changes: 0 additions & 19 deletions keyboard/fc660c/unimap_plain.c

This file was deleted.

8 changes: 8 additions & 0 deletions keyboard/fc660c/update_bin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
make clean
make
cp fc660c.hex binary/fc660c.hex
make clean
make KEYMAP=emu
cp fc660c.hex binary/fc660c_emu.hex
make clean

0 comments on commit 22f6cb2

Please sign in to comment.