Skip to content

Implement keyberon emission points for OneShotActivated, ChordResolved, TapDanceResolved #68

@malpern

Description

@malpern

Summary

The TCP protocol types and Swift handlers are ready for three overlay events, but the keyberon emission points are not yet implemented:

Event Protocol Swift Keyberon Emission
OneShotActivated ❌ Not implemented
ChordResolved ❌ Not implemented
TapDanceResolved ❌ Not implemented

What's Ready

  • tcp_protocol/src/lib.rs - Message types defined
  • src/tcp_server.rs - Capabilities advertised
  • KanataEventListener.swift - Handlers ready
  • RuleCollectionsManager.swift - Notification posting ready

What's Missing

Each event needs an emission point added to keyberon/src/layout.rs:

OneShotActivated

  • Location: One-shot state machine
  • Trigger: When modifier is applied to next keypress
  • Complexity: Medium - multiple states to consider

ChordResolved

  • Location: Chord recognition logic
  • Trigger: When multi-key combo matches a defined chord
  • Complexity: High - must track N keys and match patterns

TapDanceResolved

  • Location: Tap-dance timeout handler
  • Trigger: When dance timer expires and action is chosen
  • Complexity: Medium - timeout-based with tap counting

Reference Implementation

See TapActivated implementation for the pattern:

  • keyberon/src/layout.rs:1243 - Sets tap_activated in waiting_into_tap()
  • src/kanata/mod.rs:1230-1244 - Emits via TCP

Priority

Low - These are less commonly used features compared to tap-hold (TapActivated/HoldActivated which are complete).

Documentation

See docs/kanata-fork/tcp-overlay-events.md for full details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions