label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

Data Manager shortcuts does not work (Shift+ArrowKey)

Open INPatelP opened this issue 8 months ago • 9 comments

Describe the bug Can not navigate through images using shortcuts (Shift+ArrowKey)

To Reproduce Steps to reproduce the behavior:

  1. Import images in Label Studio Community version
  2. Start annotating. Ctrl+Enter will submit the changes
  3. Shift+ArrowKey will not do anything.

Expected behavior It should work as described in user/account/hotkeys under Data Manager sub-window Shortcuts for navigating and managing tasks in Project's Data Manager.

Environment (please complete the following information):

  • OS: Win11
  • Label Studio Version 1.23.0

Additional context It was working in previous version.

INPatelP avatar Mar 18 '26 14:03 INPatelP

Hello,

Thank you for contacting Label Studio, Could you please try these quick checks to help isolate it and let us know the outcome

  1. Test in another browser.
  2. Test in an incognito/private window.
  3. Disable browser extensions temporarily.
  4. Confirm whether it fails only in the labeling view, or also in the Data Manager task list/quick view.

Best Regards!

Comment by Oussama Assili Workflow Run

heidi-humansignal avatar Apr 07 '26 11:04 heidi-humansignal

Hello,

thank you for your reply.

  • Tested in Edge, Firefox, Arc

    • Browser Extensions on & off
    • Private & incognito
  • It fails in Data Manager and Labeling View. (I checked again - Shift+ArrowKey is fully functional in v1.22.0)

Best Regards

INPatelP avatar Apr 21 '26 10:04 INPatelP

Shortcut keys are indeed not easy to use in v1.23.0, but v1.22.0 is normal.

MAKENOTES avatar Apr 28 '26 02:04 MAKENOTES

Hello,

Thank you for your feedback! We are currently looking into this matter with our engineering team. will follow up accordingly! Best Regards!

Comment by Oussama Assili Workflow Run

heidi-humansignal avatar Apr 29 '26 14:04 heidi-humansignal

Ran into this today myself - it works if you click the focus back onto the main banner of the website.

So click on the empty space next to the breadcrumb, then shortcut will work. On next page it now won't work until you click on the empty space again or anything in that bar (e.g. the keyboard shortcut toast).

Not ideal!

EDIT: Can confirm that it is all working fine on v1.22.0, will stick to this version.

ajstewart avatar Jun 02 '26 21:06 ajstewart

same issue for me too , and clicking on the header and trying a shortcut is working , and once one shortcut is activated , then again i have to click on the header to use another shortcut , so thats not the actuall solution !! can anyone confirm if its working on a specific version ?

mrbeandev avatar Sep 10 '26 04:09 mrbeandev

I can also confirm that downgrading to v1.22 worked. There are significant changes between versions, so this may not be a viable option. But it does fix the issue.

elijahfhopp avatar Sep 21 '26 14:09 elijahfhopp

+1, downgrading to v1.22 as workaround

zhiweit avatar Oct 28 '26 08:10 zhiweit

I dug into this on 1.23.0. There are three separate guards that kill dm.focus-previous / dm.focus-next while a task is open, which is why fixing only the lsfLabeling check (#9650) doesn't fully bring it back:

  1. web/libs/datamanager/src/sdk/hotkeys.ts: useShortcut returns for every DM shortcut when document.body.dataset.lsfLabeling === "true". Only Shift+←/→ actually collide with editor hotkeys.
  2. web/libs/datamanager/src/components/MainView/DataView/Table.jsx: the focus-previous/next handlers return unless document.activeElement === document.body. Any click inside the labeling panel moves focus off <body>.
  3. hotkeys-js default filter (used by react-hotkeys-hook): it drops key events whose target is an INPUT/TEXTAREA/SELECT. A Choice is an antd Radio, i.e. <input type="radio">. So after clicking a choice in a classification project, the event never reaches the handler at all.

All three affect custom bindings too, e.g. remapping data_manager:dm.focus-next to Ctrl+→ in hotkey settings.

I opened #10047, which fixes all three:

  • an opt-in yieldToEditor flag in the keymap, set only on Shift+←/→;
  • a "skip only while typing" check in place of the body-focus check;
  • a custom hotkeys filter.

It includes unit tests.

Workaround until it's released: call window.DM.dataStore.focusNext() / focusPrev() followed by window.DM.startLabeling(task) from your own key handler.

kritzerenkrieg avatar Nov 13 '26 03:11 kritzerenkrieg