Skip to content

Comments

feat: support mapping manually#539

Open
Kaiser-Yang wants to merge 11 commits intowindwp:masterfrom
Kaiser-Yang:master
Open

feat: support mapping manually#539
Kaiser-Yang wants to merge 11 commits intowindwp:masterfrom
Kaiser-Yang:master

Conversation

@Kaiser-Yang
Copy link

This is to make it possible to manually binding everything.

Copilot AI and others added 11 commits February 7, 2026 06:16
Co-authored-by: Kaiser-Yang <58209855+Kaiser-Yang@users.noreply.github.com>
Co-authored-by: Kaiser-Yang <58209855+Kaiser-Yang@users.noreply.github.com>
Co-authored-by: Kaiser-Yang <58209855+Kaiser-Yang@users.noreply.github.com>
Co-authored-by: Kaiser-Yang <58209855+Kaiser-Yang@users.noreply.github.com>
Co-authored-by: Kaiser-Yang <58209855+Kaiser-Yang@users.noreply.github.com>
- Move map_pair check inside expr_map to only affect pair rules
- Other map_* options (map_bs, map_cr, map_c_h, map_c_w) now work independently
- Add normalize_key function for consistent key normalization
- Update README example to disable all map_* options
- Improve tests to handle mixed case key variations

Co-authored-by: Kaiser-Yang <58209855+Kaiser-Yang@users.noreply.github.com>
Use part:upper():match() to detect modifiers (C, M, S) regardless of case

Co-authored-by: Kaiser-Yang <58209855+Kaiser-Yang@users.noreply.github.com>
…lower_bracket

- Changed expr_map to use early return pattern instead of nested if
- Replaced normalize_key with lower_bracket function that correctly handles Meta key combinations
- Updated comparisons to use lowercase for all keys (including c-h and c-w)
- lower_bracket preserves case for Meta key combinations like <m-A> vs <m-a>

Co-authored-by: Kaiser-Yang <58209855+Kaiser-Yang@users.noreply.github.com>
Add map_pair option and get_key_handler API for manual keymap control
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants