1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
| export const DEFAULT_HOTKEYS = [
| // Annotation Controls
| {
| id: 100,
| section: "annotation",
| element: "annotation:submit",
| label: "Submit Annotation",
| key: "ctrl+enter",
| description: "Submit the current annotation",
| active: true,
| },
| {
| id: 200,
| section: "annotation",
| element: "annotation:skip",
| label: "Skip Task",
| key: "ctrl+space",
| description: "Skip the current task",
| active: true,
| },
| {
| id: 300,
| section: "annotation",
| element: "annotation:undo",
| label: "Undo",
| key: "ctrl+z",
| description: "Undo last action",
| active: true,
| },
| {
| id: 400,
| section: "annotation",
| element: "annotation:redo",
| label: "Redo",
| key: "ctrl+shift+z",
| description: "Redo previously undone action",
| active: true,
| },
|
| // Data Manager
| {
| id: 500,
| section: "data_manager",
| element: "dm.focus-previous",
| label: "Focus Previous Task",
| key: "shift+up",
| description: "Move focus to the previous task",
| active: true,
| },
| {
| id: 600,
| section: "data_manager",
| element: "dm.focus-next",
| label: "Focus Next Task",
| key: "shift+down",
| description: "Move focus to the next task",
| active: true,
| },
| {
| id: 700,
| section: "data_manager",
| element: "dm.close-labeling",
| label: "Focus Closed Task",
| key: "shift+left",
| description: "Focus on the closed task column",
| active: true,
| },
| {
| id: 800,
| section: "data_manager",
| element: "dm.open-labeling",
| label: "Focus Open Task",
| key: "shift+right",
| description: "Focus on the open task column",
| active: true,
| },
| {
| id: 900,
| section: "data_manager",
| element: "dm.toggle-bulk-sidebar-minimization",
| label: "Toggle Bulk Sidebar",
| key: "shift+.",
| description: "Minimize or expand bulk actions sidebar",
| active: true,
| },
|
| // Region Management
| {
| id: 1100,
| section: "regions",
| element: "region:delete-all",
| label: "Delete All Regions",
| key: "ctrl+backspace",
| description: "Remove all regions",
| active: true,
| },
| {
| id: 1200,
| section: "regions",
| element: "region:focus",
| label: "Focus First Region",
| key: "enter",
| description: "Move focus to the first focusable region",
| active: true,
| },
| {
| id: 1300,
| section: "regions",
| element: "region:relation",
| label: "Create Region Relation",
| key: "alt+r",
| description: "Create a relation between selected regions",
| active: true,
| },
| {
| id: 1400,
| section: "regions",
| element: "region:visibility",
| label: "Toggle Region Visibility",
| key: "alt+h",
| description: "Show or hide the selected region",
| active: true,
| },
| {
| id: 1500,
| section: "regions",
| element: "region:visibility-all",
| label: "Toggle All Region Visibility",
| key: "ctrl+h",
| description: "Show or hide all regions",
| active: true,
| },
| {
| id: 1600,
| section: "regions",
| element: "region:lock",
| label: "Lock Region",
| key: "alt+l",
| description: "Lock or unlock the selected region",
| active: true,
| },
| {
| id: 1700,
| section: "regions",
| element: "region:meta",
| label: "Edit Region Metadata",
| key: "alt+m",
| description: "Edit metadata for selected region",
| active: true,
| },
| {
| id: 1800,
| section: "regions",
| element: "region:unselect",
| label: "Unselect Region",
| key: "u",
| description: "Deselect the currently selected region",
| active: true,
| },
| {
| id: 1900,
| section: "regions",
| element: "region:exit",
| label: "Exit Region Mode",
| key: "escape",
| description: "Exit relation mode and unselect region",
| active: true,
| },
| {
| id: 2000,
| section: "regions",
| element: "region:delete",
| label: "Delete Selected Region",
| key: "backspace",
| description: "Delete currently selected region",
| active: true,
| },
| {
| id: 2100,
| section: "regions",
| element: "region:cycle",
| label: "Cycle Regions",
| key: "alt+.",
| description: "Cycle through all regions",
| active: true,
| },
| {
| id: 2200,
| section: "regions",
| element: "region:duplicate",
| label: "Duplicate Region",
| key: "ctrl+d",
| description: "Create a copy of the selected region",
| active: true,
| },
| {
| id: 2300,
| section: "regions",
| element: "segment:delete",
| label: "Delete Segment",
| key: "delete",
| description: "Delete selected segment",
| active: true,
| },
|
| // Editor - Audio Controls
| {
| id: 2400,
| section: "audio",
| element: "audio:back",
| label: "Rewind 1 Second",
| key: "ctrl+b",
| description: "Rewind the audio by 1 second",
| active: true,
| },
| {
| id: 2500,
| section: "audio",
| element: "audio:playpause",
| label: "Play / Pause Audio",
| key: "ctrl+p",
| description: "Toggle audio playback",
| active: true,
| },
| {
| id: 2600,
| section: "audio",
| element: "audio:step-backward",
| label: "Step Back",
| key: "alt+a",
| description: "Step back one frame",
| active: true,
| },
| {
| id: 2700,
| section: "audio",
| element: "audio:step-forward",
| label: "Step Forward",
| key: "alt+d",
| description: "Step forward one frame",
| active: true,
| },
|
| // Editor - Video Controls
| {
| id: 2800,
| section: "video",
| element: "media:playpause",
| label: "Play / Pause Video",
| key: "ctrl+alt+space",
| description: "Toggle video playback",
| active: true,
| },
| {
| id: 2900,
| section: "video",
| element: "media:step-backward",
| label: "Step Back",
| key: "alt+left",
| description: "Step one frame backward",
| active: true,
| },
| {
| id: 3000,
| section: "video",
| element: "media:step-forward",
| label: "Step Forward",
| key: "alt+right",
| description: "Step one frame forward",
| active: true,
| },
| {
| id: 3100,
| section: "video",
| element: "video:keyframe-backward",
| label: "Previous Keyframe",
| key: "ctrl+alt+left",
| description: "Jump to previous keyframe",
| active: true,
| },
| {
| id: 3200,
| section: "video",
| element: "video:keyframe-forward",
| label: "Next Keyframe",
| key: "ctrl+alt+right",
| description: "Jump to next keyframe",
| active: true,
| },
| {
| id: 3300,
| section: "video",
| element: "video:backward",
| label: "Seek Backward",
| key: "alt+left",
| description: "Seek video backward",
| active: true,
| },
| {
| id: 3400,
| section: "video",
| element: "video:rewind",
| label: "First Frame",
| key: "shift+ctrl+alt+left",
| description: "Jump to first frame",
| active: true,
| },
| {
| id: 3500,
| section: "video",
| element: "video:forward",
| label: "Seek Forward",
| key: "shift+alt+right",
| description: "Seek video forward",
| active: true,
| },
| {
| id: 3600,
| section: "video",
| element: "video:fastforward",
| label: "Last Frame",
| key: "shift+ctrl+alt+right",
| description: "Jump to last frame",
| active: true,
| },
| {
| id: 3700,
| section: "video",
| element: "video:hop-backward",
| label: "Hop Backward",
| key: "shift+alt+left",
| description: "Hop backward quickly",
| active: true,
| },
| {
| id: 3800,
| section: "video",
| element: "video:hop-forward",
| label: "Hop Forward",
| key: "shift+alt+right",
| description: "Hop forward quickly",
| active: true,
| },
|
| // Editor - Time Series Controls
| {
| id: 3900,
| section: "timeseries",
| element: "ts:grow-left",
| label: "Extend Left",
| key: "left",
| description: "Extend the region to the left",
| active: true,
| },
| {
| id: 4000,
| section: "timeseries",
| element: "ts:grow-right",
| label: "Extend Right",
| key: "right",
| description: "Extend the region to the right",
| active: true,
| },
| {
| id: 4100,
| section: "timeseries",
| element: "ts:shrink-left",
| label: "Shrink Left",
| key: "alt+left",
| description: "Shrink the region from the left",
| active: true,
| },
| {
| id: 4200,
| section: "timeseries",
| element: "ts:shrink-right",
| label: "Shrink Right",
| key: "alt+right",
| description: "Shrink the region from the right",
| active: true,
| },
| {
| id: 4300,
| section: "timeseries",
| element: "ts:grow-left-large",
| label: "Extend Left (Large)",
| key: "shift+left",
| description: "Extend region left significantly",
| active: true,
| },
| {
| id: 4400,
| section: "timeseries",
| element: "ts:grow-right-large",
| label: "Extend Right (Large)",
| key: "shift+right",
| description: "Extend region right significantly",
| active: true,
| },
| {
| id: 4500,
| section: "timeseries",
| element: "ts:shrink-left-large",
| label: "Shrink Left (Large)",
| key: "shift+alt+left",
| description: "Shrink region from left significantly",
| active: true,
| },
| {
| id: 4600,
| section: "timeseries",
| element: "ts:shrink-right-large",
| label: "Shrink Right (Large)",
| key: "shift+alt+right",
| description: "Shrink region from right significantly",
| active: true,
| },
|
| // Image Gallery Controls
| {
| id: 4700,
| section: "image_gallery",
| element: "image:prev",
| label: "Previous Image",
| key: "ctrl+left",
| description: "View previous image",
| active: true,
| },
| {
| id: 4800,
| section: "image_gallery",
| element: "image:next",
| label: "Next Image",
| key: "ctrl+right",
| description: "View next image",
| active: true,
| },
|
| {
| id: 5000,
| section: "tools",
| element: "tool:zoom-in",
| label: "Zoom In",
| key: "ctrl+plus",
| description: "Zoom in on the image",
| active: true,
| },
| {
| id: 5100,
| section: "tools",
| element: "tool:pan-image",
| label: "Pan Image",
| key: "H",
| description: "Pan around the image",
| active: true,
| },
| {
| id: 5200,
| section: "tools",
| element: "tool:zoom-to-fit",
| label: "Zoom to Fit",
| key: "shift+1",
| description: "Zoom to fit the full image in view",
| active: true,
| },
| {
| id: 5300,
| section: "tools",
| element: "tool:zoom-to-actual",
| label: "Zoom to 100%",
| key: "shift+2",
| description: "Zoom to actual image size (100%)",
| active: true,
| },
| {
| id: 5400,
| section: "tools",
| element: "tool:zoom-out",
| label: "Zoom Out",
| key: "ctrl+minus",
| description: "Zoom out of the image",
| active: true,
| },
| {
| id: 5401,
| section: "tools",
| element: "tool:move",
| label: "Move Tool",
| key: "V",
| description: "Select the move tool to reposition annotations",
| active: true,
| },
| {
| id: 5402,
| section: "tools",
| element: "tool:brush",
| label: "Brush Tool",
| key: "B",
| description: "Select the brush tool",
| active: true,
| },
|
| {
| id: 5500,
| section: "tools",
| element: "tool:ellipse",
| label: "Ellipse Tool",
| key: "O",
| description: "Select the ellipse tool",
| active: true,
| },
| {
| id: 5600,
| section: "tools",
| element: "tool:eraser",
| label: "Eraser Tool",
| key: "E",
| description: "Select the eraser tool",
| active: true,
| },
| {
| id: 5700,
| section: "tools",
| element: "tool:auto-detect",
| label: "Auto Detect",
| key: "M",
| description: "Use the auto-detect tool to automatically suggest regions",
| active: true,
| },
| {
| id: 5900,
| section: "tools",
| element: "tool:key-point",
| label: "Key Point Tool",
| key: "K",
| description: "Select the key point annotation tool",
| active: true,
| },
| {
| id: 6000,
| section: "tools",
| element: "tool:magic-wand",
| label: "Magic Wand",
| key: "W",
| description: "Select the magic wand tool for smart region selection",
| active: true,
| },
| {
| id: 6100,
| section: "tools",
| element: "tool:polygon",
| label: "Polygon Tool",
| key: "P",
| description: "Select the polygon annotation tool",
| active: true,
| },
| {
| id: 6200,
| section: "tools",
| element: "tool:rect",
| label: "Rectangle Tool",
| key: "R",
| description: "Select the rectangle annotation tool",
| active: true,
| },
| {
| id: 6201,
| section: "tools",
| element: "tool:rect-3point",
| label: "3-Point Rectangle",
| key: "shift+R",
| description: "Draw a rotated rectangle using 3-point selection",
| active: true,
| },
|
| {
| id: 6300,
| section: "tools",
| element: "tool:rotate-left",
| label: "Rotate Left",
| key: "alt+left",
| description: "Rotate the image 90° to the left",
| active: true,
| },
| {
| id: 6400,
| section: "tools",
| element: "tool:rotate-right",
| label: "Rotate Right",
| key: "alt+right",
| description: "Rotate the image 90° to the right",
| active: true,
| },
| {
| id: 6700,
| section: "tools",
| element: "tool:decrease-tool",
| label: "Decrease Tool Size",
| key: "[",
| description: "Decrease tool size",
| active: true,
| },
| {
| id: 6800,
| section: "tools",
| element: "tool:increase-tool",
| label: "Increase Tool Size",
| key: "]",
| description: "Increase tool size",
| active: true,
| },
|
| // Paragraph Navigation
| {
| id: 6900,
| section: "paragraphs",
| element: "phrases:next-phrase",
| label: "Next Phrase",
| key: "ctrl+down",
| description: "Navigate to the next phrase in paragraph view",
| active: true,
| },
| {
| id: 7000,
| section: "paragraphs",
| element: "phrases:previous-phrase",
| label: "Previous Phrase",
| key: "ctrl+up",
| description: "Navigate to the previous phrase in paragraph view",
| active: true,
| },
| {
| id: 7100,
| section: "paragraphs",
| element: "phrases:select_all_annotate",
| label: "Select All and Annotate",
| key: "ctrl+shift+a",
| description: "Select all text in current phrase and create annotation",
| active: true,
| },
| {
| id: 7200,
| section: "paragraphs",
| element: "phrases:next-region",
| label: "Next Region in Phrase",
| key: "ctrl+right",
| description: "Navigate to the next region within current phrase",
| active: true,
| },
| {
| id: 7300,
| section: "paragraphs",
| element: "phrases:previous-region",
| label: "Previous Region in Phrase",
| key: "ctrl+left",
| description: "Navigate to the previous region within current phrase",
| active: true,
| },
| ];
|
| export const HOTKEY_SECTIONS = [
| {
| id: "annotation",
| title: "Annotation Actions",
| description: "Shortcuts for common annotation tasks like submit, skip, undo and redo",
| },
|
| {
| id: "data_manager",
| title: "Data Manager",
| description: "Shortcuts for navigating and managing tasks in Project's Data Manager",
| },
|
| {
| id: "regions",
| title: "Region Management",
| description: "Shortcuts for creating, selecting and manipulating annotation regions",
| },
|
| {
| id: "tools",
| title: "Tools",
| description: "Shortcuts for controlling tools panel when labeling images",
| },
|
| {
| id: "audio",
| title: "Audio Controls",
| description: "Shortcuts for controlling audio playback and navigation",
| },
| {
| id: "video",
| title: "Video Controls",
| description: "Shortcuts for controlling video playback and navigation",
| },
| {
| id: "timeseries",
| title: "Time Series Controls",
| description: "Shortcuts for manipulating time series data regions",
| },
| {
| id: "image_gallery",
| title: "Image Gallery Navigation",
| description: "Shortcuts for navigating between images in multi-image tasks",
| },
| {
| id: "paragraphs",
| title: "Paragraph Navigation",
| description: "Shortcuts for navigating phrases and regions in paragraph/dialogue view",
| },
| ];
|
| /**
| * URL patterns mapped to their corresponding hotkey sections
| * Used to automatically determine which shortcuts to display based on current page
| */
| export const URL_TO_SECTION_MAPPING = [
| {
| regex: /\/projects\/\d+\/data\/?\?.*task=\d+/i,
| section: ["annotation", "regions"],
| },
| {
| regex: /\/projects\/\d+\/data\/?$/i,
| section: "data_manager",
| },
| ];
|
|