Skip to content

[BUG] Arrow keys not working as replacement for j and k in keybindings #245

@inigosola

Description

@inigosola

Arrow keys not working as replacement for j and k in keybindings

Describe the bug 🐛

I am trying to use the arrow keys (up and down) instead of j and k for navigation, but they do not seem to work. The keybindings for j and k function correctly, but the arrow keys do not trigger the expected behavior.

To Reproduce 🐣

Steps to reproduce the behavior:

  1. Set up keybindings in NORMAL mode for up and down.
  2. Press the arrow keys on the keyboard.
  3. Observe that they do not perform the same actions as j and k.

Code I used to set the keybindings:

@subscribe(Startup)
def setup(api: DooitAPI, _):
    api.keys.set("up", api.move_up, "arrow up")
    api.keys.set("down", api.move_down, "arrow down")

Code I used to check the keybindings:

@subscribe(DooitEvent)
def evento(api: DooitAPI, a):
    with open("a.txt", "w") as f:
        f.write(str(api.keys.keybinds["NORMAL"]["j"])+"\n")
        f.write(str(api.keys.keybinds["NORMAL"]["k"])+"\n")
        f.write(str(api.keys.keybinds["NORMAL"]["up"])+"\n")
        f.write(str(api.keys.keybinds["NORMAL"]["down"])+"\n")

a.txt file content:

DooitFunction(callback=<bound method DooitAPI.move_down of <dooit.ui.api.dooit_api.DooitAPI object at 0x105a867b0>>, description='Move the cursor down in the focused list', group='')
DooitFunction(callback=<bound method DooitAPI.move_up of <dooit.ui.api.dooit_api.DooitAPI object at 0x105a867b0>>, description='Move the cursor up in the focused list', group='')
DooitFunction(callback=<bound method DooitAPI.move_up of <dooit.ui.api.dooit_api.DooitAPI object at 0x105a867b0>>, description='arrow up', group='')
DooitFunction(callback=<bound method DooitAPI.move_down of <dooit.ui.api.dooit_api.DooitAPI object at 0x105a867b0>>, description='arrow down', group='')

Expected behavior 🤔

I expect the up and down arrow keys to behave the same way as j and k in NORMAL mode, allowing me to navigate accordingly.

Desktop 🤖

OS: macOS 15.6.1
Version: 15.6.1

Additional context 📝

Arrow keys do not trigger any action, despite being listed in the keybinds dictionary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions