Skip to content

Shift-Tab definition (code-char 353) shadows unicode "š" symbol (U+0161) #656

Description

@avitkauskas

I use custom Colemak-based keyboard layout with a lot of national symbols added in (like ą, č, ę, š, ų, ū etc.).

In vi normal mode, it's natural to use keys k n e i or n e i o for cursor movements, so I usually remap a lot of keys in vim. And then it makes sense to use all the national symbols in normal mode for various actions as you do not use them to type any text there anyway. Therefore, I usually remap o and O (insert-line-below & insert-line-above) in vim to š and Š on my keyboard.

I tried to remap these keys in lem, and Š (capital) works perfectly well:
(define-key lem-vi-mode:*command-keymap* "Š" 'lem-vi-mode/commands:vi-open-adove) ; typo in command name

But remaping to š (lowercase) with this:
(define-key lem-vi-mode:*command-keymap* "š" 'lem-vi-mode/commands:vi-open-below) ; š is read as Shit-Tab
gives an error Key not found: Shift Tab

This is because the definition of Shift Tab in src/key.lisp shadows the š character (U+0161) (decimal 353):
(setf (key-to-character (make-key :shift t :sym "Tab")) (code-char 353))

It works OK with some symbols (e.g. ų):
(define-key lem-vi-mode:*command-keymap* "ų" 'lem-vi-mode/commands:vi-open-below)

But similar error happens with others (e.g. č):
(define-key lem-vi-mode:*command-keymap* "č" 'lem-vi-mode/commands:vi-open-below)
Error: Key not found: F5

I think the Shift state and other states should be tracked differently in lem code to avoid these problems.

Activity

  1. github-actions commented on Aug 12, 2025

    @github-actions
    Contributor

    This issue has been inactive for {days} days. If there is no activity within the next 14 days, it will be automatically closed. Please add a comment if it is still relevant.

  2. github-actions commented on Aug 27, 2025

    @github-actions
    Contributor

    Closing this issue due to inactivity. Please reopen or create a new issue if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions