From: Oleg Kostyuk Date: Fri, 2 Jan 2015 21:55:55 +0000 (+0200) Subject: Merge remote-tracking branch 'tmk/master' into cub_layout X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=77815a2959c11c0c8e78d2fd3b67fa1242b5e26a;hp=c5d3988e7ace6a7c940f543ab2539be8ef15bd7d;p=max%2Ftmk_keyboard.git Merge remote-tracking branch 'tmk/master' into cub_layout --- diff --git a/common/command.c b/common/command.c index 971ef7f0..1a507e3a 100644 --- a/common/command.c +++ b/common/command.c @@ -194,6 +194,7 @@ static bool command_common(uint8_t code) case KC_CAPSLOCK: if (host_get_driver()) { host_driver = host_get_driver(); + clear_keyboard(); host_set_driver(0); print("Locked.\n"); } else { diff --git a/common/keycode.h b/common/keycode.h index 08c3cbf4..ac4ef00d 100644 --- a/common/keycode.h +++ b/common/keycode.h @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -/* +/* * Keycodes based on HID Usage Keyboard/Keypad Page(0x07) plus special codes * http://www.usb.org/developers/devclass_docs/Hut1_12.pdf */ @@ -140,6 +140,8 @@ along with this program. If not, see . #define KC_VOLD KC_AUDIO_VOL_DOWN #define KC_MNXT KC_MEDIA_NEXT_TRACK #define KC_MPRV KC_MEDIA_PREV_TRACK +#define KC_MFFD KC_MEDIA_FAST_FORWARD +#define KC_MRWD KC_MEDIA_REWIND #define KC_MSTP KC_MEDIA_STOP #define KC_MPLY KC_MEDIA_PLAY_PAUSE #define KC_MSEL KC_MEDIA_SELECT @@ -390,7 +392,7 @@ enum hid_keyboard_keypad_usage { KC_RALT, KC_RGUI, - /* NOTE: 0xE8-FF are used for internal special purpose */ + /* NOTE: 0xE8-FF are used for internal special purpose */ }; /* Special keycodes */ @@ -420,7 +422,9 @@ enum internal_special_keycodes { KC_WWW_FORWARD, KC_WWW_STOP, KC_WWW_REFRESH, - KC_WWW_FAVORITES, /* 0xBA */ + KC_WWW_FAVORITES, + KC_MEDIA_FAST_FORWARD, + KC_MEDIA_REWIND, /* 0xBC */ /* Fn key */ KC_FN0 = 0xC0, diff --git a/common/report.h b/common/report.h index 62190469..f6c0a315 100644 --- a/common/report.h +++ b/common/report.h @@ -61,6 +61,7 @@ along with this program. If not, see . /* supplement for Bluegiga iWRAP HID(not supported by Windows?) */ #define AL_LOCK 0x019E #define TRANSPORT_RECORD 0x00B2 +#define TRANSPORT_FAST_FORWARD 0x00B3 #define TRANSPORT_REWIND 0x00B4 #define TRANSPORT_EJECT 0x00B8 #define AC_MINIMIZE 0x0206 @@ -158,6 +159,8 @@ typedef struct { (key == KC_AUDIO_VOL_DOWN ? AUDIO_VOL_DOWN : \ (key == KC_MEDIA_NEXT_TRACK ? TRANSPORT_NEXT_TRACK : \ (key == KC_MEDIA_PREV_TRACK ? TRANSPORT_PREV_TRACK : \ + (key == KC_MEDIA_FAST_FORWARD ? TRANSPORT_FAST_FORWARD : \ + (key == KC_MEDIA_REWIND ? TRANSPORT_REWIND : \ (key == KC_MEDIA_STOP ? TRANSPORT_STOP : \ (key == KC_MEDIA_EJECT ? TRANSPORT_STOP_EJECT : \ (key == KC_MEDIA_PLAY_PAUSE ? TRANSPORT_PLAY_PAUSE : \ @@ -171,7 +174,7 @@ typedef struct { (key == KC_WWW_FORWARD ? AC_FORWARD : \ (key == KC_WWW_STOP ? AC_STOP : \ (key == KC_WWW_REFRESH ? AC_REFRESH : \ - (key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0))))))))))))))))))) + (key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0))))))))))))))))))))) #ifdef __cplusplus } diff --git a/converter/usb_usb/README b/converter/usb_usb/README index 69caabb2..30d5deb1 100644 --- a/converter/usb_usb/README +++ b/converter/usb_usb/README @@ -7,7 +7,19 @@ Arduino Leonardo http://arduino.cc/en/Main/ArduinoBoardLeonardo Circuit@Home USB Host Shield 2.0 - http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino + https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino-assembled/ + +Buying Arduino Leonardo and USB Host Shield 2.0(from Circuit@home) will be the easiest way, you won't need even soldering iron. +Arduino's Shield will also work well but I think Sparkfun's needs to be modified. + + http://arduino.cc/en/Main/ArduinoUSBHostShield + https://www.sparkfun.com/products/9947 + +Also Pro Micro 3.3V(not Mini) or Teensy with mini host shield will work with some fixes on signal/power routing. + https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini + https://www.sparkfun.com/products/12587 + https://www.pjrc.com/teensy/td_libs_USBHostShield.html + Build firmware @@ -32,6 +44,8 @@ Limitation Only supports 'HID Boot protocol'. Not support keyboard LED yet. +Note that the converter can host only USB "boot protocol" keyboard(6KRO) and not NKRO, it is possible to support NKRO keyboard but you will need to write HID report parser for that. Every NKRO keyboard can have different HID report and it is difficult to support all kind of NKRO keyboards in the market. + Update diff --git a/protocol.mk b/protocol.mk index e057d1d6..d9194b2b 100644 --- a/protocol.mk +++ b/protocol.mk @@ -15,11 +15,13 @@ endif ifdef PS2_USE_INT SRC += protocol/ps2_interrupt.c + SRC += protocol/ps2_io_avr.c OPT_DEFS += -DPS2_USE_INT endif ifdef PS2_USE_USART SRC += protocol/ps2_usart.c + SRC += protocol/ps2_io_avr.c OPT_DEFS += -DPS2_USE_USART endif diff --git a/protocol/ps2_io_avr.c b/protocol/ps2_io_avr.c index be13d669..ed462345 100644 --- a/protocol/ps2_io_avr.c +++ b/protocol/ps2_io_avr.c @@ -1,4 +1,5 @@ #include +#include #include /* Check port settings for clock and data line */