diff options
Diffstat (limited to 'converter')
-rw-r--r-- | converter/adb_usb/Makefile | 108 | ||||
-rw-r--r-- | converter/adb_usb/Makefile.blargg (renamed from converter/adb_usb/Makefile.lufa) | 4 | ||||
-rw-r--r-- | converter/adb_usb/Makefile.pjrc | 63 | ||||
-rw-r--r-- | converter/adb_usb/adb_blargg.c | 216 | ||||
-rw-r--r-- | converter/adb_usb/adb_blargg.h | 38 | ||||
-rw-r--r-- | converter/adb_usb/config.h | 6 | ||||
-rw-r--r-- | converter/adb_usb/led.c | 5 | ||||
-rw-r--r-- | converter/adb_usb/matrix.c | 12 | ||||
-rw-r--r-- | converter/m0110_usb/Makefile | 3 | ||||
-rw-r--r-- | converter/m0110_usb/README.md | 128 | ||||
-rw-r--r-- | converter/m0110_usb/config.h | 12 | ||||
-rw-r--r-- | converter/m0110_usb/doc/m0110.jpg | bin | 49360 -> 0 bytes | |||
-rw-r--r-- | converter/m0110_usb/doc/teensy.jpg | bin | 50081 -> 0 bytes | |||
-rw-r--r-- | converter/m0110_usb/keymap.c | 139 | ||||
-rw-r--r-- | converter/news_usb/config_pjrc.h | 6 | ||||
-rw-r--r-- | converter/ps2_usb/config.h | 6 |
16 files changed, 577 insertions, 169 deletions
diff --git a/converter/adb_usb/Makefile b/converter/adb_usb/Makefile index 09f30180a8..372ef6c09a 100644 --- a/converter/adb_usb/Makefile +++ b/converter/adb_usb/Makefile @@ -1,5 +1,45 @@ +#---------------------------------------------------------------------------- +# 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 = adb_usb +TARGET = adb_usb_lufa # Directory common source filess exist TOP_DIR = ../.. @@ -7,7 +47,7 @@ TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . -# keyboard dependent files +# project specific files SRC = keymap.c \ matrix.c \ led.c \ @@ -16,22 +56,47 @@ SRC = keymap.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 - +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 # 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. +# 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) + +# Interrupt driven control endpoint task(+60) +#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + # Boot Section Size in *bytes* # Teensy halfKay 512 # Teensy++ halfKay 1024 @@ -44,20 +109,23 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+5000) -#EXTRAKEY_ENABLE = yes # Audio control and System control(+600) -#CONSOLE_ENABLE = yes # Console for debug -#COMMAND_ENABLE = yes # Commands for debug and configuration +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(+500) +#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA + +# Optimize size but this may cause error "relocation truncated to fit" +#EXTRALDFLAGS = -Wl,--relax # Search Path VPATH += $(TARGET_DIR) VPATH += $(TOP_DIR) -include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol/lufa.mk include $(TOP_DIR)/protocol.mk include $(TOP_DIR)/common.mk include $(TOP_DIR)/rules.mk diff --git a/converter/adb_usb/Makefile.lufa b/converter/adb_usb/Makefile.blargg index 372ef6c09a..edce82d695 100644 --- a/converter/adb_usb/Makefile.lufa +++ b/converter/adb_usb/Makefile.blargg @@ -39,7 +39,7 @@ #---------------------------------------------------------------------------- # Target file name (without extension). -TARGET = adb_usb_lufa +TARGET = adb_usb_blargg # Directory common source filess exist TOP_DIR = ../.. @@ -51,7 +51,7 @@ TARGET_DIR = . SRC = keymap.c \ matrix.c \ led.c \ - adb.c + adb_blargg.c CONFIG_H = config.h diff --git a/converter/adb_usb/Makefile.pjrc b/converter/adb_usb/Makefile.pjrc new file mode 100644 index 0000000000..c3a5d8f553 --- /dev/null +++ b/converter/adb_usb/Makefile.pjrc @@ -0,0 +1,63 @@ +# Target file name (without extension). +TARGET = adb_usb_pjrc + +# Directory common source filess exist +TOP_DIR = ../.. + +# Directory keyboard dependent files exist +TARGET_DIR = . + +# keyboard dependent files +SRC = keymap.c \ + matrix.c \ + led.c \ + adb.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 + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+5000) +EXTRAKEY_ENABLE = yes # Audio control and System control(+600) +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +#NKRO_ENABLE = yes # USB Nkey Rollover(+500) + + +# Search Path +VPATH += $(TARGET_DIR) +VPATH += $(TOP_DIR) + +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/converter/adb_usb/adb_blargg.c b/converter/adb_usb/adb_blargg.c new file mode 100644 index 0000000000..963758c533 --- /dev/null +++ b/converter/adb_usb/adb_blargg.c @@ -0,0 +1,216 @@ +// Bit-banged implementation without any use of interrupts. +// Data pin must have external 1K pull-up resistor. +// Operates data pin as open-collector output. + +#include "adb_blargg.h" + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include <avr/io.h> +#include <avr/interrupt.h> +#include <util/delay.h> + +// Copyright 2011 Jun WAKO <wakojun@gmail.com> +// Copyright 2013 Shay Green <gblargg@gmail.com> +// See bottom of file for license + +typedef uint8_t byte; + +// Make loop iteration take us total, including cyc overhead of loop logic +#define delay_loop_usec( us, cyc ) \ + __builtin_avr_delay_cycles( (unsigned long) (F_CPU / 1e6 * (us) + 0.5) - (cyc) ) + +#if !defined(ADB_PORT) || \ + !defined(ADB_PIN) || \ + !defined(ADB_DDR) || \ + !defined(ADB_DATA_BIT) + #error +#endif + +enum { data_mask = 1<<ADB_DATA_BIT }; + +enum { adb_cmd_read = 0x2C }; +enum { adb_cmd_write = 0x28 }; + +// gcc is very unreliable for inlining, so use macros +#define data_lo() (ADB_DDR |= data_mask) +#define data_hi() (ADB_DDR &= ~data_mask) +#define data_in() (ADB_PIN & data_mask) + +static void place_bit( byte bit ) +{ + // 100 us bit cell time + data_lo(); + _delay_us( 35 ); + + // Difference between a 0 and 1 bit is just this 30us portion in the middle + if ( bit ) + data_hi(); + _delay_us( 30 ); + + data_hi(); + _delay_us( 35 ); +} + +static void place_bit0( void ) { place_bit( 0 ); } +static void place_bit1( void ) { place_bit( 1 ); } + +static void send_byte( byte data ) +{ + for ( byte n = 8; n; n-- ) + { + place_bit( data & 0x80 ); + data <<= 1; + } +} + +static void command( byte cmd ) +{ + data_lo(); + _delay_us( 800 ); + place_bit1(); + send_byte( cmd ); + place_bit0(); +} + +void adb_host_init( void ) +{ + // Always keep port output 0, then just toggle DDR to be GND or leave it floating (high). + ADB_DDR &= ~data_mask; + ADB_PORT &= ~data_mask; + + #ifdef ADB_PSW_BIT + // Weak pull-up + ADB_PORT |= (1<<ADB_PSW_BIT); + ADB_DDR &= ~(1<<ADB_PSW_BIT); + #endif +} + +bool adb_host_psw( void ) +{ + #ifdef ADB_PSW_BIT + return (ADB_PIN & (1<<ADB_PSW_BIT)) != 0; + #else + return true; + #endif +} + +// Waits while data == val, or until us timeout expires. Returns remaining time, +// zero if timed out. +static byte while_data( byte us, byte data ) +{ + while ( data_in() == data ) + { + delay_loop_usec( 1 /* us period */, 7 /* cycles loop overhead */ ); + if ( !--us ) + break; + } + return us; +} + +static byte while_lo( byte us ) { return while_data( us, 0 ); } +static byte while_hi( byte us ) { return while_data( us, data_mask ); } + +static uint16_t adb_host_talk( byte cmd ) +{ + command( cmd ); + _delay_us( 5 ); + if ( !while_hi( 260 - 5 ) ) // avg 160 + return adb_host_nothing; + + // Receive start bit and 16 data bits. + // Doing them all in loop allows consistent error checking + uint16_t data = 0; + byte n = 17; + do + { + data <<= 1; + enum { timeout = 130 }; // maximum bit cell time + + byte lo = while_lo( timeout ); + if ( !lo ) + goto error; // timeout + + byte hi = while_hi( lo ); + if ( !hi ) + goto error; // timeout + + if ( timeout-lo < lo-hi ) + data |= 1; + else if ( n == 17 ) + goto error; // start bit is wrong + } + while ( --n ); + + // duration must be split in two due to 255 limit + if ( !while_lo( 255 ) && !while_lo( 351 - 255 ) ) + goto error; + + if ( while_hi( 91 ) ) + goto error; + + return data; + +error: + return adb_host_error; +} + +uint16_t adb_host_kbd_recv( void ) +{ + return adb_host_talk( adb_cmd_read + 0 ); +} + +uint16_t adb_host_kbd_modifiers( void ) +{ + return adb_host_talk( adb_cmd_read + 2 ); +} + +void adb_host_listen( byte cmd, byte data_h, byte data_l ) +{ + command( cmd ); + _delay_us( 200 ); + + place_bit1(); + send_byte( data_h ); + send_byte( data_l ); + place_bit0(); +} + +void adb_host_kbd_led( byte led ) +{ + adb_host_listen( adb_cmd_write + 2, 0, led & 0x07 ); +} + +/* This software is licensed with a Modified BSD License. +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. */ diff --git a/converter/adb_usb/adb_blargg.h b/converter/adb_usb/adb_blargg.h new file mode 100644 index 0000000000..2542cb5496 --- /dev/null +++ b/converter/adb_usb/adb_blargg.h @@ -0,0 +1,38 @@ +// Basic support for ADB keyboard + +#ifndef ADB_BLARGG_H +#define ADB_BLARGG_H + +#include <stdint.h> +#include <stdbool.h> + +// Sets up ADB bus. Doesn't send anything to keyboard. +void adb_host_init( void ); + +// Receives key press event from keyboard. +// 0xKKFF: one key changed state +// 0xKKKK: two keys changed state +enum { adb_host_nothing = 0 }; // no keys changed state +enum { adb_host_error = 0xFFFE }; // receive error +uint16_t adb_host_kbd_recv( void ); + +// Current state of keyboard modifiers and a few other keys +// Returns adb_host_nothing if keyboard didn't respond. +// Returns adb_host_error if error receiving. +uint16_t adb_host_kbd_modifiers( void ); + +// Sends command and two bytes of data to keyboard +void adb_host_listen( uint8_t cmd, uint8_t data_h, uint8_t data_l ); + +// Sets keyboard LEDs. Note that bits are inverted here, so 1 means off, 0 means on. +void adb_host_kbd_led( uint8_t led ); + +// State of power switch (false = pressed), or true if unsupported +bool adb_host_psw( void ); + + +// Legacy support +#define ADB_POWER 0x7F +#define ADB_CAPS 0x39 + +#endif diff --git a/converter/adb_usb/config.h b/converter/adb_usb/config.h index 4ce27bbfeb..5ce5c22159 100644 --- a/converter/adb_usb/config.h +++ b/converter/adb_usb/config.h @@ -44,12 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USE_LEGACY_KEYMAP -/* mouse keys */ -#ifdef MOUSEKEY_ENABLE -# define MOUSEKEY_DELAY_TIME 192 -#endif - - /* ADB port setting */ #define ADB_PORT PORTD #define ADB_PIN PIND diff --git a/converter/adb_usb/led.c b/converter/adb_usb/led.c index 0e162f379b..1e7911f942 100644 --- a/converter/adb_usb/led.c +++ b/converter/adb_usb/led.c @@ -15,12 +15,15 @@ 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 <stdint.h> +#include <util/delay.h> #include "adb.h" #include "led.h" void led_set(uint8_t usb_led) { + // need a wait to send command without miss + _delay_ms(100); adb_host_kbd_led(~usb_led); } diff --git a/converter/adb_usb/matrix.c b/converter/adb_usb/matrix.c index a616d10e40..54be2b0f57 100644 --- a/converter/adb_usb/matrix.c +++ b/converter/adb_usb/matrix.c @@ -67,6 +67,13 @@ uint8_t matrix_cols(void) void matrix_init(void) { adb_host_init(); + // wait for keyboard to boot up and receive command + _delay_ms(1000); + // Enable keyboard left/right modifier distinction + // Addr:Keyboard(0010), Cmd:Listen(10), Register3(11) + // upper byte: reserved bits 0000, device address 0010 + // lower byte: device handler 00000011 + adb_host_listen(0x2B,0x02,0x03); // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; @@ -85,6 +92,7 @@ uint8_t matrix_scan(void) uint8_t key0, key1; is_modified = false; + _delay_ms(12); // delay for preventing overload of poor ADB keyboard controller codes = adb_host_kbd_recv(); key0 = codes>>8; key1 = codes&0xFF; @@ -100,9 +108,7 @@ uint8_t matrix_scan(void) } else if (codes == 0xFFFF) { // power key release register_key(0xFF); } else if (key0 == 0xFF) { // error - if (debug_matrix) print("adb_host_kbd_recv: ERROR(matrix cleared.)\n"); - // clear matrix to unregister all keys - for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; + xprintf("adb_host_kbd_recv: ERROR(%02X)\n", codes); return key1; } else { register_key(key0); diff --git a/converter/m0110_usb/Makefile b/converter/m0110_usb/Makefile index 66eae880f4..7791527e43 100644 --- a/converter/m0110_usb/Makefile +++ b/converter/m0110_usb/Makefile @@ -71,13 +71,14 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # *Comment out* to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +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 +KEYMAP_SECTION_ENABLE = yes # fixed address keymap for keymap editor diff --git a/converter/m0110_usb/README.md b/converter/m0110_usb/README.md index bd8bef9f21..b3fb8f7e97 100644 --- a/converter/m0110_usb/README.md +++ b/converter/m0110_usb/README.md @@ -1,10 +1,12 @@ M0110/M0110A to USB keyboard converter ====================================== -This firmware converts the protocol of Apple Macintosh keyboard M0110/M0110A into USB. -Target board of this project is [PJRC Teensy](http://www.pjrc.com/teensy/), though, -you can use other board with USB AVR like `ATmega32U4` and `AT90USB`. +This firmware converts the protocol of Apple Macintosh keyboard **M0110**, **M0110A** and **M0120** into USB. Target of this project is USB AVR controller **ATmega32U4**. Using this converter you can revive these retro keyboards with modern computer. + +Pics of **M0110 + M0120** and **M0110A**. + +![M0110+M0120](http://i.imgur.com/dyvXb2Tm.jpg) +![M0110A](http://i.imgur.com/HuHOEoHm.jpg) -![M0110](https://raw.github.com/tmk/tmk_keyboard/master/converter/m0110_usb/doc/m0110.jpg) - M0110A support was contributed by [skagon@github](https://github.com/skagon). - M0120 also is supported. keys(+ * / and ,) on M0120 are recognized as cursor keys. @@ -13,49 +15,42 @@ you can use other board with USB AVR like `ATmega32U4` and `AT90USB`. Update ------ -- 2013/08 Change port for signals PF to PD +- 2013/08: Change port for signals `PF` to `PD` +- 2013/09: Change port again, it uses inversely `PD0` for data and `PD1` for clock line now. -Connection ----------- -You need 4P4C plug and cable to connect Teensy or other AVR dev board into the keyboard. -Teensy port `PD0` is assigned for `CLOCK` line and `PD1` for `DATA` by default, -you can change pin configuration with editing *config.h*. +Building Hardware +----------------- +You need **4P4C** cable and **ATMega32U4** board like PJRC [Teensy]. Port of the MCU `PD1` is assigned to `CLOCK` line and `PD0` to `DATA` by default, you can change pin configuration with editing `config.h`. -You can find 4P4C plugs on telephone handset cable. Note that it is *crossover* connection -while Macintosh keyboard cable is *straight*. +[![M0110 Converter](http://i.imgur.com/4G2ZOegm.jpg)](http://i.imgur.com/4G2ZOeg.jpg) -[![Conection](https://raw.github.com/tmk/tmk_keyboard/master/converter/m0110_usb/doc/teensy.jpg)] +### 4P4C phone handset cable +Note that original cable used with Mac is **straight** while phone handset cable is **crossover**. -In this pic: +<http://en.wikipedia.org/wiki/Modular_connector#4P4C> -1. `GND`(Black) -2. `CLOCK`(Red) -3. `DATA`(Green) -4. `+5V`(Yellow) +Close-up pic of handset cable. You can see one end of plug has reverse color codes against the other. Click to enlarge. +[![4P4C cable](http://i.imgur.com/3S9P1mYm.jpg?1)](http://i.imgur.com/3S9P1mY.jpg?1) -Note that wire colors may vary in your cable. +[Teensy]: http://www.pjrc.com/teensy/ -### Pinout +### Socket Pinout - <http://pinouts.ru/Inputs/MacKeyboard_pinout.shtml> -- <http://en.wikipedia.org/wiki/Modular_connector#4P4C> ![Jack fig](http://www.kbdbabel.org/conn/kbd_connector_macplus.png) ### Pull-up Registor -You may need pull-up registors on signal lines(`CLOCK`, `DATA`) in particular -when you have long or coiled cable. 1k-10k Ohm will be OK for this purpose. -In some cases MCU can't read signal from keyboard correctly without pull-up resistors. +You may need pull-up registors on signal lines(`CLOCK`, `DATA`) in particular when you have long or coiled cable. **1k-10k Ohm** will be OK for this purpose. In that case the converter may not read signal from keyboard correctly without pull-up resistors. Building Frimware ----------------- -To compile firmware you need AVR GCC. You can use [WinAVR](http://winavr.sourceforge.net/) on Windows. -You can edit *Makefile* and *config.h* to change compile options and pin configuration. +To compile firmware you need AVR GCC. You can edit *Makefile* and *config.h* to change compile options and pin configuration. $ git clone git://github.com/tmk/tmk_keyboard.git (or download source) $ cd m0110_usb @@ -71,64 +66,69 @@ Keymap You can change keymaps by editing *keymap.c*. ### M0110 & M0120 -#### *Default* - ,---------------------------------------------------------. ,---------------. - | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Ctl| -|Lft|Rgt| - |---------------------------------------------------------| |---------------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | 7| 8| 9| Up| - |---------------------------------------------------------| |---------------| - |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| Dn| - |---------------------------------------------------------| |---------------| - |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | 1| 2| 3| | - `---------------------------------------------------------' |-----------|Ent| - |Ctl|Alt | Space |Gui |Ctl| | 0| .| | - `-----------------------------------------------' `---------------' -#### *HHKB/WASD Layer(WASD/IJKL)* - ,---------------------------------------------------------. ,---------------. - |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk| -|Lft|Rgt| - |---------------------------------------------------------| |---------------| - |Caps |Hom| Up|PgU| | | |PgU| Up|Hom|Psc|Slk|Pau|Ins| | 7| 8| 9| Up| - |---------------------------------------------------------| |---------------| - |Fn0 |Lef|Dow|Rig| | | |Lef|Dow|Rig| | |Return| | 4| 5| 6| Dn| - |---------------------------------------------------------| |---------------| - |Shift |End| |PgD| | | |PgD| |End| |Shift | | 1| 2| 3| | - `---------------------------------------------------------' |-----------|Ent| - |Ctl|Alt | Space |Gui |Ctl| | 0| .| | - `-----------------------------------------------' `---------------' +#### *Default Layer* + ,---------------------------------------------------------. ,---------------. + | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Clr| -|Lft|Rgt| + |---------------------------------------------------------| |---------------| + |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | 7| 8| 9| Up| + |---------------------------------------------------------| |---------------| + |Caps | A| S| D| F| G| H| J| K| L| ;| '|Enter | | 4| 5| 6| Dn| + |---------------------------------------------------------| |---------------| + |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | 1| 2| 3| | + `---------------------------------------------------------' |-----------|Ent| + |Ctl|Gui | Space |Alt |Ctl| | 0| .| | + `-----------------------------------------------' `---------------' + +- `Space` and `Enter` also work as `Fn` layer switch key when holding down. + +#### *Function Layer(WASD/HHKB)* + ,---------------------------------------------------------. ,---------------. + |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk| -|Lft|Rgt| + |---------------------------------------------------------| |---------------| + |Caps |Hom| Up|PgU| | | | |Psc|Slk|Pau|Up |Ins| \| | 7| 8| 9| Up| + |---------------------------------------------------------| |---------------| + |Caps |Lef|Dow|Rig| | | | |Hom|PgU|Lef|Rig|Enter | | 4| 5| 6| Dn| + |---------------------------------------------------------| |---------------| + |Shift |End| |PgD| | | | |End|PgD|Dow|Shift | | 1| 2| 3| | + `---------------------------------------------------------' |-----------|Ent| + |Ctl|Gui | Space |Alt |Ctl| | 0| .| | + `-----------------------------------------------' `---------------' + ### M0110A -#### *Default* +#### *Default Layer* ,---------------------------------------------------------. ,---------------. - | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Ctl| =| /| *| + | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Clr| =| /| *| |---------------------------------------------------------| |---------------| |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -| |-----------------------------------------------------' | |---------------| - |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +| + |Caps | A| S| D| F| G| H| J| K| L| ;| '|Enter | | 4| 5| 6| +| |---------------------------------------------------------| |---------------| |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft| Up| | 1| 2| 3| | |---------------------------------------------------------| |-----------|Ent| - |Alt |Gui | Space | \|Lft|Rgt| Dn| | 0| .| | + |Ctrl |Gui | Space | \|Lft|Rgt|Dwn| | 0| .| | `---------------------------------------------------------' `---------------' -#### *Cursor Layer(WASD/IJKL)* + +- `Space` and `Enter` also work as `Fn` layer switch key when holding down. +- `Backslash(\)` also works as `Alt` when holding down. + +#### *Function Layer(WASD/HHKB)* ,---------------------------------------------------------. ,---------------. |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk| =| /| *| |---------------------------------------------------------| |---------------| - |Caps |Hom| Up|PgU| | | |PgU| Up|Hom|Psc|Slk|Pau| | | 7| 8| 9| -| + |Caps |Hom| Up|PgU| | | | |Psc|Slk|Pau|Up |Ins| | | 7| 8| 9| -| |-----------------------------------------------------' | |---------------| - |Fn0 |Lef|Dow|Rig| | | |Lef|Dow|Rig| | |Return| | 4| 5| 6| +| + |Caps |Lef|Dow|Rig| | | | |Hom|PgU|Lef|Rig|Enter | | 4| 5| 6| +| |---------------------------------------------------------| |---------------| - |Shift |End| |PgD| | | |PgD| |End| |Shif|PgU| | 1| 2| 3| | + |Shift |End| |PgD| | | | |End|PgD|Dow|Shif|PgU| | 1| 2| 3| | |---------------------------------------------------------| |-----------|Ent| - |Alt |Gui | Space |Ins|Hom|End|PgD| | 0| .| | + |Ctrl |Gui | Space | \|Hom|End|PgD| | 0| .| | `---------------------------------------------------------' `---------------' Debug ----- -You can use [PJRC HID listen](http://www.pjrc.com/teensy/hid_listen.html) to see debug output. - -The converter has some functions for debug, press `<magickey>+H` simultaneously to get help. -These function is totally undocumented, tentative, inconsistent and buggy. +You can use [PJRC HID listen](http://www.pjrc.com/teensy/hid_listen.html) to see debug output. The converter has some functions for debug, press `<Command>+H` simultaneously to get help. -magickey: Shift+Option+Command(Shift+Alt+Gui or Shift+Alt+Control) +- Command: `Shift+Option+Command`(`Shift+Alt+Gui` or `Shift+Alt+Control`) diff --git a/converter/m0110_usb/config.h b/converter/m0110_usb/config.h index 2f63a3a490..801bc4ebfa 100644 --- a/converter/m0110_usb/config.h +++ b/converter/m0110_usb/config.h @@ -32,10 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 8 -/* legacy keymap support */ -#define USE_LEGACY_KEYMAP - - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ @@ -48,15 +44,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LCTL)) \ ) +/* boot magic key */ +#define BOOTMAGIC_KEY_SALT KC_FN0 +#define BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL KC_LCAP + /* ports */ #define M0110_CLOCK_PORT PORTD #define M0110_CLOCK_PIN PIND #define M0110_CLOCK_DDR DDRD -#define M0110_CLOCK_BIT 0 +#define M0110_CLOCK_BIT 1 #define M0110_DATA_PORT PORTD #define M0110_DATA_PIN PIND #define M0110_DATA_DDR DDRD -#define M0110_DATA_BIT 1 +#define M0110_DATA_BIT 0 #endif diff --git a/converter/m0110_usb/doc/m0110.jpg b/converter/m0110_usb/doc/m0110.jpg Binary files differdeleted file mode 100644 index ef9a123abc..0000000000 --- a/converter/m0110_usb/doc/m0110.jpg +++ /dev/null diff --git a/converter/m0110_usb/doc/teensy.jpg b/converter/m0110_usb/doc/teensy.jpg Binary files differdeleted file mode 100644 index 96e93e7e24..0000000000 --- a/converter/m0110_usb/doc/teensy.jpg +++ /dev/null diff --git a/converter/m0110_usb/keymap.c b/converter/m0110_usb/keymap.c index 7a3bc35856..031c881b72 100644 --- a/converter/m0110_usb/keymap.c +++ b/converter/m0110_usb/keymap.c @@ -44,7 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * |---------------------------------------------------------| |---------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -| * |-----------------------------------------------------' | |---------------| - * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +| + * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Enter | | 4| 5| 6| +| * |---------------------------------------------------------| |---------------| * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| | * |---------------------------------------------------------' |-----------|Ent| @@ -57,7 +57,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * |---------------------------------------------------------| |---------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | 7| 8| 9| /| * |---------------------------------------------------------| |---------------| - * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| ,| + * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Enter | | 4| 5| 6| ,| * |---------------------------------------------------------| |---------------| * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | 1| 2| 3| | * `---------------------------------------------------------' |-----------|Ent| @@ -77,7 +77,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * |---------------------------------------------------------| |---------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -| * |-----------------------------------------------------' | |---------------| - * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +| + * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Enter | | 4| 5| 6| +| * |---------------------------------------------------------| |---------------| * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| | * |---------------------------------------------------------| |-----------|Ent| @@ -108,89 +108,116 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { KC_##K68, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K6D, KC_NO, KC_NO }, \ } -#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)])) - - -// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed. -static const uint8_t PROGMEM fn_layer[] = { - 1, // Fn0 - 0, // Fn1 - 0, // Fn2 - 0, // Fn3 - 0, // Fn4 - 0, // Fn5 - 0, // Fn6 - 0 // Fn7 -}; - -// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer. -// See layer.c for details. -static const uint8_t PROGMEM fn_keycode[] = { - KC_NO, // Fn0 - KC_NO, // Fn1 - KC_NO, // Fn2 - KC_NO, // Fn3 - KC_NO, // Fn4 - KC_NO, // Fn5 - KC_NO, // Fn6 - KC_NO // Fn7 -}; - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +#ifdef KEYMAP_SECTION_ENABLE +const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = { +#else +static const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { +#endif /* Default: * ,---------------------------------------------------------. ,---------------. - * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Ctl| =| /| *| + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Clr| =| /| *| * |---------------------------------------------------------| |---------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -| * |-----------------------------------------------------' | |---------------| - * |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +| + * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Enter | | 4| 5| 6| +| * |---------------------------------------------------------| |---------------| * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| | * |---------------------------------------------------------| |-----------|Ent| - * |Ctl |Alt | Space |Gui| \|Lft|Rgt|Dn | | 0| .| | + * |Ctl |Gui | Space |Alt| \|Lft|Rgt|Dn | | 0| .| | * `---------------------------------------------------------' `---------------' */ - KEYMAP( - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, LCTL,EQL, PSLS,PAST, + [0] = KEYMAP( + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, CLR, EQL, PSLS,PAST, 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, + LCAP,A, S, D, F, G, H, J, K, L, SCLN,QUOT, FN15, P4, P5, P6, PPLS, LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, UP, P1, P2, P3, PENT, - LCTL,LALT, SPC, LGUI,BSLS,LEFT,RGHT,DOWN, P0, PDOT + LCTL,LGUI, FN16, LALT,FN31,LEFT,RGHT,DOWN, P0, PDOT ), /* Cursor Layer(WASD, IJKL) * ,---------------------------------------------------------. ,---------------. * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk| =| /| *| * |---------------------------------------------------------| |---------------| - * |Caps |Hom| Up|PgU| | | |PgU| Up|Hom|Psc|Slk|Pau| | | 7| 8| 9| -| + * |Caps |Hom| Up|PgU| | | | |Psc|Slk|Pau|Up |Ins| | | 7| 8| 9| -| * |-----------------------------------------------------' | |---------------| - * |Fn0 |Lef|Dow|Rig| | | |Lef|Dow|Rig| | |Return| | 4| 5| 6| +| + * |Caps |Lef|Dow|Rig| | | | |Hom|PgU|Lef|Rig|Enter | | 4| 5| 6| +| * |---------------------------------------------------------| |---------------| - * |Shift |End| |PgD| | | |PgD| |End| |Shif|PgU| | 1| 2| 3| | + * |Shift |End| |PgD| | | | |End|PgD|Dow|Shif|PgU| | 1| 2| 3| | * |---------------------------------------------------------| |-----------|Ent| - * |Ctl |Alt | Space |Gui |Ins|Hom|End|PgD| | 0| .| | + * |Ctl |Gui | Space |Alt | \|Hom|End|PgD| | 0| .| | * `---------------------------------------------------------' `---------------' */ - KEYMAP( + [3] = KEYMAP( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, NLCK,EQL, PSLS,PAST, + CAPS,HOME,UP, PGUP,NO, NO, NO, NO, PSCR,SLCK,PAUS,UP, INS, P7, P8, P9, PMNS, + LCAP,LEFT,DOWN,RGHT,NO, NO, NO, NO, HOME,PGUP,LEFT,RGHT, FN15, P4, P5, P6, PPLS, + LSFT,END, NO, PGDN,NO, NO, NO, NO, END, PGDN,DOWN, PGUP, P1, P2, P3, PENT, + LCTL,LGUI, FN16, LALT,FN31,HOME,END, PGDN, P0, PDOT + ), + [4] = KEYMAP( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, NLCK,EQL, PSLS,PAST, - 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, - LCTL,LALT, SPC, LGUI,INS, HOME,END, PGDN, P0, PDOT + CAPS,HOME,UP, PGUP,NO, NO, NO, NO, PSCR,SLCK,PAUS,UP, INS, P7, P8, P9, PMNS, + LCAP,LEFT,DOWN,RGHT,NO, NO, NO, NO, HOME,PGUP,LEFT,RGHT, FN15, P4, P5, P6, PPLS, + LSFT,END, NO, PGDN,NO, NO, NO, NO, END, PGDN,DOWN, PGUP, P1, P2, P3, PENT, + LCTL,LGUI, FN16, LALT,FN31,HOME,END, PGDN, P0, PDOT ), + [7] = {}, +}; + + +/* + * Fn action definition + */ +#ifdef KEYMAP_SECTION_ENABLE +const uint16_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = { +#else +static const uint16_t fn_actions[] PROGMEM = { +#endif + [0] = ACTION_LAYER_MOMENTARY(1), + [1] = ACTION_LAYER_MOMENTARY(2), + [2] = ACTION_LAYER_MOMENTARY(3), + [3] = ACTION_LAYER_MOMENTARY(4), + [4] = ACTION_LAYER_MOMENTARY(5), + [5] = ACTION_LAYER_MOMENTARY(6), + [6] = ACTION_LAYER_MOMENTARY(7), + [7] = ACTION_LAYER_TOGGLE(1), + [8] = ACTION_LAYER_TOGGLE(2), + [9] = ACTION_LAYER_TOGGLE(3), + [10] = ACTION_LAYER_TAP_TOGGLE(1), + [11] = ACTION_LAYER_TAP_TOGGLE(2), + [12] = ACTION_LAYER_TAP_TOGGLE(3), + [13] = ACTION_LAYER_TAP_KEY(1, KC_F), + [14] = ACTION_LAYER_TAP_KEY(2, KC_J), + [15] = ACTION_LAYER_TAP_KEY(3, KC_ENTER), + [16] = ACTION_LAYER_TAP_KEY(4, KC_SPACE), + [17] = ACTION_LAYER_TAP_KEY(5, KC_SCOLON), + [18] = ACTION_LAYER_TAP_KEY(6, KC_QUOTE), + [19] = ACTION_LAYER_TAP_KEY(7, KC_SLASH), + [20] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_SPACE), + [21] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_SPACE), + [22] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_QUOTE), + [23] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENTER), + [24] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), + [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPACE), + [26] = ACTION_MODS_ONESHOT(MOD_LCTL), + [27] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC), + [28] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPACE), + [29] = ACTION_MODS_ONESHOT(MOD_LSFT), + [30] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRAVE), + [31] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_BSLASH), }; -uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col) -{ - return KEYCODE(layer, row, col); -} -uint8_t keymap_fn_layer(uint8_t index) +/* translates key to keycode */ +uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) { - return pgm_read_byte(&fn_layer[index]); + return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); } -uint8_t keymap_fn_keycode(uint8_t index) +/* translates Fn index to action */ +action_t keymap_fn_to_action(uint8_t keycode) { - return pgm_read_byte(&fn_keycode[index]); + action_t action; + action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); + return action; } diff --git a/converter/news_usb/config_pjrc.h b/converter/news_usb/config_pjrc.h index 92751d1eea..adce014c9e 100644 --- a/converter/news_usb/config_pjrc.h +++ b/converter/news_usb/config_pjrc.h @@ -42,12 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ) -/* mouse keys */ -#ifdef MOUSEKEY_ENABLE -# define MOUSEKEY_DELAY_TIME 255 -#endif - - /* Asynchronous USART * 8-data bit, non parity, 1-stop bit, no flow control */ diff --git a/converter/ps2_usb/config.h b/converter/ps2_usb/config.h index 4a2d1fc47b..51cd271d78 100644 --- a/converter/ps2_usb/config.h +++ b/converter/ps2_usb/config.h @@ -39,10 +39,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ) -/* mouse keys */ -#ifdef MOUSEKEY_ENABLE -# define MOUSEKEY_DELAY_TIME 255 -#endif +/* legacy keymap support */ +#define USE_LEGACY_KEYMAP #ifdef PS2_USE_USART |