]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Fix keymap for new framework
authortmk <nobody@nowhere>
Tue, 5 Mar 2013 06:41:21 +0000 (15:41 +0900)
committertmk <nobody@nowhere>
Tue, 5 Mar 2013 06:41:21 +0000 (15:41 +0900)
18 files changed:
README.md
common/keymap.c
converter/m0110_usb/Makefile.lufa [new file with mode: 0644]
converter/m0110_usb/README.md
converter/m0110_usb/config.h
converter/m0110_usb/keymap.c
converter/pc98_usb/keymap.c
keyboard/IIgs/Makefile [moved from keyboard/IIgs_Standard/Makefile with 100% similarity]
keyboard/IIgs/README [moved from keyboard/IIgs_Standard/README with 100% similarity]
keyboard/IIgs/config.h [moved from keyboard/IIgs_Standard/config.h with 100% similarity]
keyboard/IIgs/doc/PIN_BYPASS.jpg [moved from keyboard/IIgs_Standard/doc/PIN_BYPASS.jpg with 100% similarity]
keyboard/IIgs/doc/Teensy++_Mod.jpg [moved from keyboard/IIgs_Standard/doc/Teensy++_Mod.jpg with 100% similarity]
keyboard/IIgs/hid_listen.mac [moved from keyboard/IIgs_Standard/hid_listen.mac with 100% similarity]
keyboard/IIgs/keymap.c [moved from keyboard/IIgs_Standard/keymap.c with 100% similarity]
keyboard/IIgs/led.c [moved from keyboard/IIgs_Standard/led.c with 100% similarity]
keyboard/IIgs/matrix.c [moved from keyboard/IIgs_Standard/matrix.c with 100% similarity]
keyboard/hhkb/keymap.c
protocol/vusb/vusb.c

index b85e03ddbf54d51931fd214fbf9884b37d6efc7b..e9dad457d8480598637de33921bb34e4156b63a3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ You can find some keyboard specific projects under `converter` and `keyboard` di
 * [hhkb](keyboard/hhkb/)                    - [Happy Hacking Keyboard professional][GH_hhkb]
 * [macway](keyboard/macway/)                - [Compact keyboard mod][GH_macway]
 * [hbkb](keyboard/hbkb/)                    - [Happy Buckling sprint keyboard(IBM Model M mod)][GH_hbkb]
-* [IIgs_Standard](keyboard/IIgs_Standard/)  - Apple [IIGS] keyboard mod(by JeffreySung)
+* [IIgs_Standard](keyboard/IIgs/)           - Apple [IIGS] keyboard mod(by JeffreySung)
 * [hid_liber](keyboard/hid_liber/)          - [HID liberation controller][HID_liber](by alaricljs)
 * [phantom](keyboard/phantom/)              - [Phantom keyboard][PHANTOM] (by Tranquilite)
 * [gh60](keyboard/gh60/)                    - [GH60 keyboard][GH60]
index f72be577941f118a62dbf98607fa926c1106e6ba..aa8d944a79301f400ee1e3b24de0d7c1b8a8c2d1 100644 (file)
@@ -38,12 +38,6 @@ action_t action_for_key(uint8_t layer, key_t key)
             return keycode_to_action(keycode);
     }
 }
-
-__attribute__ ((weak))
-const prog_macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }
-
-__attribute__ ((weak))
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {}
 #else
 /* 
  * legacy keymap support
@@ -71,13 +65,17 @@ action_t action_for_key(uint8_t layer, key_t key)
             return keycode_to_action(keycode);
     }
 }
-/* not used for legacy keymap */
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-}
 #endif
 
 
+__attribute__ ((weak))
+const prog_macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }
+
+__attribute__ ((weak))
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {}
+
+
+
 
 /* translates keycode to action */
 static action_t keycode_to_action(uint8_t keycode)
diff --git a/converter/m0110_usb/Makefile.lufa b/converter/m0110_usb/Makefile.lufa
new file mode 100644 (file)
index 0000000..028bdf9
--- /dev/null
@@ -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
index 206f4342512de6aa08de3f1517c4ea7d38984409..80503e875512e9f2917e0da8b17f1c77cf9434dc 100644 (file)
@@ -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
index be00259e6b6fe88a69cbb51b50030c0935c195ac..d43f283838e7b180e8a978cf5222479021f2f301 100644 (file)
@@ -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
index 191bf3a15698925288edfb437ba34feeb88de9c1..7a3bc3585624acc8a9887fcbca8f1df5feb15274 100644 (file)
@@ -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
     ),
 };
 
index f793539dfdd5fcc5cc43c8fa673e20e26442a7dc..279b2b60c0532513fa99549c177f0224baaaaede 100644 (file)
@@ -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
index 0d07c79cf359cc0daf7a8478380059cacde8c421..094d33af113e010085bad1237ffbcbb626b4f32c 100644 (file)
@@ -82,7 +82,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
      *       |Gui|Alt  |         Space         |Alt  |Gui|
      *       `-------------------------------------------'
      */ 
-    KEYMAP(PWR, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
+    KEYMAP(GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
            CAPS,NO,  NO,  NO,  NO,  NO,  NO,  NO,  PSCR,SLCK,PAUS, UP,  NO,  BSPC, \
            LCTL,VOLD,VOLU,MUTE,NO,  NO,  PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, \
            LSFT,NO,  NO,  NO,  NO,  NO,  PPLS,PMNS,END, PGDN,DOWN,RSFT,TRNS, \
@@ -101,7 +101,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
      *       |Gui|Alt  |          Space        |Alt  |Gui|
      *       `-------------------------------------------'
      */
-    KEYMAP(ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
+    KEYMAP(GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
            TAB, HOME,PGDN,UP,  PGUP,END, HOME,PGDN,PGUP,END, NO,  NO,  NO,  BSPC, \
            LCTL,NO,  LEFT,DOWN,RGHT,NO,  LEFT,DOWN,UP,  RGHT,NO,  NO,  ENT, \
            LSFT,NO,  NO,  NO,  NO,  NO,  HOME,PGDN,PGUP,END, TRNS,RSFT,NO, \
@@ -121,7 +121,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
      *      `--------------------------------------------'
      * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel 
      */
-    KEYMAP(ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
+    KEYMAP(GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
            TAB, NO,  NO,  NO,  NO,  NO,  WH_L,WH_D,WH_U,WH_R,NO,  NO,  NO,  BSPC, \
            LCTL,NO,  ACL0,ACL1,ACL2,NO,  MS_L,MS_D,MS_U,MS_R,TRNS,QUOT,ENT, \
            LSFT,NO,  NO,  NO,  NO,  BTN3,BTN2,BTN1,BTN4,BTN5,SLSH,RSFT,NO, \
index 1d5f4a852809219140fe42d409ac405f9b218bca..328885a9b5c99f95e66d853bf90fecc92d84d61d 100644 (file)
@@ -88,6 +88,10 @@ static void send_keyboard(report_keyboard_t *report)
     } else {
         debug("kbuf: full\n");
     }
+
+    // NOTE: send key strokes of Macro
+    usbPoll();
+    vusb_transfer_keyboard();
 }