qmk/qmk_firmware

[Bug] (Debug logs at end) Problem with combo-mod (eg combo that resolves to KC_LSFT) into mod-tap (eg LCTL_T(KC_P)): does not capitalize.

Open

#16,391 opened on 2022年2月17日

GitHub で見る
 (3 comments) (0 reactions) (0 assignees)C (43,867 forks)batch import
bughelp wanted

Repository metrics

Stars
 (20,368 stars)
PR merge metrics
 (平均マージ 20d 9h) (30d で 27 merged PRs)

説明

Describe the Bug

(see also debug info below) CTL_P: LCTL_T(KC_P) CMB_SFT: combo of "." and "o" that resolves to KC_LSFT Keymap here.

  1. Trying to type capital "P" gives me trouble. Done quickly: "CMB_SFT down, CTL_P down, CMB_SFT up, CTL_P up" gives me lowercase "p", but I want capital "P".
  2. Using my actual shift key at a similar speed doesn't have this issue; "KC_LSFT down, CTL_P down, KC_LSFT up, CTL_P up" gives me capital "P".
  3. Also, if I try to capitalize a non-mod-tap letter, say "U", with my combo, I don't have this problem. That is, "CMB_SFT down, KC_U down, CMB_SFT up, KC_U up", gives me capital "U".

Video example (might be a bit loud).

Based on what I understand from the debugging, I think a solution could be to keep a timer of how long ago my combo-shift was de-pressed, and if the tap of the mod-tap is triggered while the timer is under a certain number, send the shifted version. But I'm wondering if what I'm experiencing is due to a "bug" or if it's an implementation limitation.

System Information

  • Keyboard: Boardwalk, Technik_o
    • Revision (if applicable):
  • Operating system: Windows, MacOS
  • AVR GCC version: 8.4.0
  • ARM GCC version: 10.1.0
  • QMK Firmware version: 0.15.21
  • Any keyboard related software installed? N

Additional Context

Some debugging. I annotated some stuff with my understanding of what's happening.

The following gives lowercase "p", but I want capital "P".

  > 
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
  > 02: 0010000000000000
    03: 0000000000000000
    04: 0000000000000000
    
  > r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0001000000000000
    02: 0010000000000000
    03: 0000000000000000
    04: 0000000000000000
  > keyboard_report: 06 02 00 00 00 00 00 00 

    // matrix says: (02, 2) and (01, 3) are down
    // keyboard says: KC_LSFT 
    
    r/c 0123456789ABCDEF
  > 00: 0000000000000000
    01: 0001100000000000
    02: 0010000000000000
    03: 0000000000000000
    04: 0000000000000000
    
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0001100000000000
    02: 0000000000000000
    03: 0000000000000000
    04: 0000000000000000
    
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000100000000000
    02: 0000000000000000
    03: 0000000000000000
    04: 0000000000000000
    keyboard_report: 06 00 00 00 00 00 00 00 

    // (01, 4), corresponding to LCTL_T(KC_P), is down according to the matrix
    // matrix says: (01, 4) is down
    // keyboard says:
    
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
    02: 0000000000000000
    03: 0000000000000000
    04: 0000000000000000
  > keyboard_report: 06 00 00 00 08 00 00 00 // matrix says:                          // keyboard says: KC_P
    keyboard_report: 06 00 00 00 00 00 00 00 

    // matrix says: 
    // keyboard says: 

The following gives capital "U", as expected.

    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
  > 02: 0010000000000000
    03: 0000000000000000
    04: 0000000000000000
  > 
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0001000000000000
  > 02: 0010000000000000
    03: 0000000000000000
    04: 0000000000000000
    keyboard_report: 06 02 00 00 00 00 00 00 

    // combo for shift 
    // matrix says: (02, 2) and (01, 3) are down
    // keyboard says: KC_LSFT
    
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0001000000000000
    02: 0010100000000000
    03: 0000000000000000
    04: 0000000000000000
    keyboard_report: 06 02 00 00 00 01 00 00 

    // (02, 4), corresponding to "U", which is a standard keycode, is hit
    // matrix says: (02, 2), (03, 3), (02, 4) are down
    // keyboard says: KC_LSFT + KC_U
    
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0001000000000000
    02: 0000100000000000
    03: 0000000000000000
    04: 0000000000000000
    
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
    02: 0000100000000000
    03: 0000000000000000
    04: 0000000000000000
  > keyboard_report: 06 00 00 00 00 01 00 00 

    // matrix says: (02, 4) is down
    // keyboard says: KC_U
  > 
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
  > 02: 0000000000000000
    03: 0000000000000000
    04: 0000000000000000
    keyboard_report: 06 00 00 00 00 00 00 00 

    // matrix says: 
    // keyboard says: 

Using actual shift instead of a combo gives expected results:

Capital "P", rolling key sequence

    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
  > 02: 0000000000000000
    03: 1000000000000000
    04: 0000000000000000
    keyboard_report: 06 02 00 00 00 00 00 00 
  > 
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000100000000000
  > 02: 0000000000000000
    03: 1000000000000000
    04: 0000000000000000
  > 
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000100000000000
  > 02: 0000000000000000
    03: 0000000000000000
    04: 0000000000000000
  > 
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
  > 02: 0000000000000000
    03: 0000000000000000
    04: 0000000000000000
    keyboard_report: 06 02 00 00 08 00 00 00 
    keyboard_report: 06 00 00 00 08 00 00 00 
    keyboard_report: 06 00 00 00 00 00 00 00 

Capital "U", rolling key sequence

  > 
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
  > 02: 0000000000000000
    03: 1000000000000000
    04: 0000000000000000
    keyboard_report: 06 02 00 00 00 00 00 00 
  > 
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
  > 02: 0000100000000000
    03: 1000000000000000
    04: 0000000000000000
    keyboard_report: 06 02 00 00 00 01 00 00 
  > 
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
  > 02: 0000100000000000
    03: 0000000000000000
    04: 0000000000000000
    keyboard_report: 06 00 00 00 00 01 00 00 
    
    r/c 0123456789ABCDEF
    00: 0000000000000000
    01: 0000000000000000
    02: 0000000000000000
    03: 0000000000000000
    04: 0000000000000000
  > keyboard_report: 06 00 00 00 00 00 00 00 

コントリビューターガイド