qmk/qmk_firmware

[Bug] Getting multiple key presses from second half.

Open

#13,352 opened on Jun 26, 2021

View on GitHub
 (10 comments) (0 reactions) (0 assignees)C (43,867 forks)batch import
bughelp wanted

Repository metrics

Stars
 (20,368 stars)
PR merge metrics
 (Avg merge 20d 9h) (27 merged PRs in 30d)

Description

Describe the Bug

I have as split keyboard with I²C communications. Both halves work great when connected via USB directly. However, when one half is connected via interlink cable to the other, then that half produces double key presses, not always but frequently. It doesn't matter which half either. Like I said its double odd since they both work on their own just fine.

I've tried playing with the de-bouncing, but it doesn't seem to resolve things, and again they both work fine when connected directly via USB.

System Information

  • Keyboard:
    Custom ErgoDactyl using AmoebaKing PCB (1 per key, an AmoebaRoyale variant)
  • Elite-C v3.1
  • PIN method for recognizing half
  • I²C interconnect with 10k pull-ups on each side.
  • RGB with individually addressable SK6812 MINI E
  • TRRS cable interconnect, 1.2m (shortest I could find on short notice.)
  • Operating system:

    • Manjaro for build and development,
    • Windows for Gaming ( Behavior is the same in both OSes )
  • AVR GCC version: 11.1.0

  • QMK Firmware version: 0.13.5

Rules.mk

MCU = atmega32u4

BOOTLOADER = caterina


BOOTMAGIC_ENABLE = no      # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
CONSOLE_ENABLE = no        # Console for debug(+400)
COMMAND_ENABLE = no        # Commands for debug and configuration

SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend

NKRO_ENABLE = yes            # USB Nkey Rollover
BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = yes       # Enable keyboard backlight functionality on B7 by default
UNICODE_ENABLE = no         # Unicode
MIDI_ENABLE = no            # MIDI controls
BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no           # Audio output on port C6

SPLIT_KEYBOARD = yes

LTO_ENABLE = yes

LAYOUTS = ergodox

Config.h

#define VENDOR_ID       0xBB80
#define PRODUCT_ID      0x0504
#define DEVICE_VER      0x0001
#define MANUFACTURER    King
#define PRODUCT         ErgoDox
#define DESCRIPTION     Dactyl


#define MATRIX_ROWS 10
#define MATRIX_COLS 9

#define MATRIX_COL_PINS_RIGHT   { B6, B2, B3, B1, F7, F6, F5, F4, B0 }
#define MATRIX_COL_PINS         { B0, F4, F5, F6, F7, B1, B3, B2, B6 }
#define MATRIX_ROW_PINS_RIGHT   { C6, D7, E6, B4, B5 }
#define MATRIX_ROW_PINS         { C6, D7, E6, B4, B5 }
#define SPLIT_HAND_PIN D2
#define UNUSED_PINS
#define USE_I2C

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
#define MATRIX_EXPANDER_COL_PINS { 5, 4, 3, 2, 1, 0 }
#define MATRIX_EXPANDER_ROW_PINS { 0, 1, 2, 3, 4, 5, 6 }

#define MOUSEKEY_INTERVAL       20
#define MOUSEKEY_DELAY          0
#define MOUSEKEY_TIME_TO_MAX    60
#define MOUSEKEY_MAX_SPEED      7
#define MOUSEKEY_WHEEL_DELAY 0

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

#define RGBLIGHT_LAYERS
#define RGBLIGHT_ANIMATIONS
#define RGBLEG_SPLIT { 38, 38 }
#define RGB_DI_PIN D4
#define RGBLED_NUM 76
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
//#define RGBLIGHT_LED_MAP { 1, 2, 3, 12, 13, 14, 15, 0, 7, 6, 5, 4, 11, 10, 9, 8 }

#define BACKLIGHT_LEVELS 3

#ifndef LED_BRIGHTNESS_LO
#define LED_BRIGHTNESS_LO       15
#endif
#ifndef LED_BRIGHTNESS_HI
#define LED_BRIGHTNESS_HI       255
#endif
#define LED_BRIGHTNESS_DEFAULT (128)


#define FORCE_NKRO

Contributor guide