Fix keymap for new framework
This commit is contained in:
parent
633d9aa53e
commit
5808317b69
18 changed files with 117 additions and 23 deletions
91
converter/m0110_usb/Makefile.lufa
Normal file
91
converter/m0110_usb/Makefile.lufa
Normal file
|
@ -0,0 +1,91 @@
|
|||
# Target file name (without extension).
|
||||
TARGET = m0110_lufa
|
||||
|
||||
# Directory common source filess exist
|
||||
TOP_DIR = ../..
|
||||
|
||||
# Directory keyboard dependent files exist
|
||||
TARGET_DIR = .
|
||||
|
||||
# keyboard dependent files
|
||||
SRC = keymap.c \
|
||||
matrix.c \
|
||||
led.c \
|
||||
m0110.c
|
||||
|
||||
CONFIG_H = config.h
|
||||
|
||||
|
||||
# MCU name, you MUST set this to match the board you are using
|
||||
# type "make clean" after changing this, so all files will be rebuilt
|
||||
#MCU = at90usb162 # Teensy 1.0
|
||||
MCU = atmega32u4 # Teensy 2.0
|
||||
#MCU = at90usb646 # Teensy++ 1.0
|
||||
#MCU = at90usb1286 # Teensy++ 2.0
|
||||
|
||||
|
||||
# Processor frequency.
|
||||
# Normally the first thing your program should do is set the clock prescaler,
|
||||
# so your program will run at the correct speed. You should also set this
|
||||
# variable to same clock speed. The _delay_ms() macro uses this, and many
|
||||
# examples use this variable to calculate timings. Do not add a "UL" here.
|
||||
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)
|
||||
|
||||
# Interrupt driven control endpoint task
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Build Options
|
||||
# *Comment out* to disable the options.
|
||||
#
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
#NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
|
||||
|
||||
# Boot Section Size in bytes
|
||||
# Teensy halfKay 512
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
OPT_DEFS += -DBOOT_SIZE=4096
|
||||
|
||||
|
||||
|
||||
#---------------- Programming Options --------------------------
|
||||
PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
|
||||
|
||||
|
||||
# Search Path
|
||||
VPATH += $(TARGET_DIR)
|
||||
VPATH += $(TOP_DIR)
|
||||
|
||||
|
||||
include $(TOP_DIR)/protocol/lufa.mk
|
||||
include $(TOP_DIR)/protocol.mk
|
||||
include $(TOP_DIR)/common.mk
|
||||
include $(TOP_DIR)/rules.mk
|
||||
|
||||
hasu: EXTRAFLAGS += -DHASU
|
||||
hasu: all
|
|
@ -53,7 +53,8 @@ You can edit *Makefile* and *config.h* to change compile options and pin configu
|
|||
|
||||
$ git clone git://github.com/tmk/tmk_keyboard.git (or download source)
|
||||
$ cd m0110_usb
|
||||
$ make
|
||||
$ make -f Makefile.lufa clean
|
||||
$ make -f Makefile.lufa
|
||||
|
||||
and program your Teensy with [PJRC Teensy loader](http://www.pjrc.com/teensy/loader.html).
|
||||
|
||||
|
@ -74,7 +75,7 @@ You can change keymaps by editing *keymap.c*.
|
|||
|---------------------------------------------------------| |---------------|
|
||||
|Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | 1| 2| 3| |
|
||||
`---------------------------------------------------------' |-----------|Ent|
|
||||
|Alt|Gui | Space |Ctl |Alt| | 0| .| |
|
||||
|Ctl|Alt | Space |Gui |Ctl| | 0| .| |
|
||||
`-----------------------------------------------' `---------------'
|
||||
#### *HHKB/WASD Layer(WASD/IJKL)*
|
||||
,---------------------------------------------------------. ,---------------.
|
||||
|
@ -86,7 +87,7 @@ You can change keymaps by editing *keymap.c*.
|
|||
|---------------------------------------------------------| |---------------|
|
||||
|Shift |End| |PgD| | | |PgD| |End| |Shift | | 1| 2| 3| |
|
||||
`---------------------------------------------------------' |-----------|Ent|
|
||||
|Alt|Gui | Space |Ctl |Alt| | 0| .| |
|
||||
|Ctl|Alt | Space |Gui |Ctl| | 0| .| |
|
||||
`-----------------------------------------------' `---------------'
|
||||
|
||||
### M0110A
|
||||
|
|
|
@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0110
|
||||
#define DEVICE_VER 0x0100
|
||||
#define MANUFACTURER t.m.k.
|
||||
#define PRODUCT M0110 keyboard converter
|
||||
#define DESCRIPTION convert M0110 keyboard to USB
|
||||
|
|
|
@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#include "usb_keyboard.h"
|
||||
#include "keycode.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
|
@ -148,7 +147,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* |---------------------------------------------------------| |---------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| |
|
||||
* |---------------------------------------------------------| |-----------|Ent|
|
||||
* |Alt |Gui | Space |Ctl| \|Lft|Rgt|Dn | | 0| .| |
|
||||
* |Ctl |Alt | Space |Gui| \|Lft|Rgt|Dn | | 0| .| |
|
||||
* `---------------------------------------------------------' `---------------'
|
||||
*/
|
||||
KEYMAP(
|
||||
|
@ -156,7 +155,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, P7, P8, P9, PMNS,
|
||||
FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS,
|
||||
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, UP, P1, P2, P3, PENT,
|
||||
LALT,LGUI, SPC, LCTL,BSLS,LEFT,RGHT,DOWN, P0, PDOT
|
||||
LCTL,LALT, SPC, LGUI,BSLS,LEFT,RGHT,DOWN, P0, PDOT
|
||||
),
|
||||
/* Cursor Layer(WASD, IJKL)
|
||||
* ,---------------------------------------------------------. ,---------------.
|
||||
|
@ -168,7 +167,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* |---------------------------------------------------------| |---------------|
|
||||
* |Shift |End| |PgD| | | |PgD| |End| |Shif|PgU| | 1| 2| 3| |
|
||||
* |---------------------------------------------------------| |-----------|Ent|
|
||||
* |Alt |Gui | Space |Gui |Ins|Hom|End|PgD| | 0| .| |
|
||||
* |Ctl |Alt | Space |Gui |Ins|Hom|End|PgD| | 0| .| |
|
||||
* `---------------------------------------------------------' `---------------'
|
||||
*/
|
||||
KEYMAP(
|
||||
|
@ -176,7 +175,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
CAPS,HOME,UP, PGUP,NO, NO, NO, PGUP,UP, HOME,PSCR,SLCK,PAUS, P7, P8, P9, PMNS,
|
||||
FN0, LEFT,DOWN,RGHT,NO, NO, NO, LEFT,DOWN,RGHT,NO, NO, ENT, P4, P5, P6, PPLS,
|
||||
LSFT,END, NO, PGDN,NO, NO, NO, PGDN,NO, END, NO, PGUP, P1, P2, P3, PENT,
|
||||
LALT,LGUI, SPC, LCTL,INS, HOME,END, PGDN, P0, PDOT
|
||||
LCTL,LALT, SPC, LGUI,INS, HOME,END, PGDN, P0, PDOT
|
||||
),
|
||||
};
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ static const uint16_t PROGMEM fn_actions[] = {
|
|||
ACTION_KEYMAP_TAP_TOGGLE(0), // FN0
|
||||
ACTION_KEYMAP_TAP_KEY(1, KC_SLASH), // FN1
|
||||
ACTION_KEYMAP_TAP_KEY(2, KC_SCLN), // FN2
|
||||
ACTION_KEYMAP(2), // FN3
|
||||
ACTION_KEYMAP_MOMENTARY(2), // FN3
|
||||
ACTION_MACRO(LBRACKET), // FN4
|
||||
ACTION_MACRO(RBRACKET), // FN5
|
||||
ACTION_MACRO(DUMMY), // FN6
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue