Fossil SCM

Remap keyboard shortcuts, and ensure only letter keys are combined with SHIFT, as non-letter keys may produce different key code pairs with and without SHIFT depending on the keyboard layout.

florian 2022-08-14 07:56 timeline-keyboard-navigation
Commit 33f9315d44afd460b902e0e7a4c314a69275f847517a06f56a8ee9f54717b0d3
2 files changed +7 -7 +7 -7
+7 -7
--- src/graph.js
+++ src/graph.js
@@ -994,19 +994,19 @@
994994
mSHIFT = 1<<13,
995995
kFRST = mSHIFT | 78 /* SHIFT+N */,
996996
kNEXT = 78 /* N */,
997997
kPREV = 77 /* M */,
998998
kLAST = mSHIFT | 77 /* SHIFT+M */,
999
- kCYCL = 72 /* H */,
1000
- kCNTR = 190 /* . */,
1001
- kSCRL = mSHIFT | 72 /* H */,
1002
- kTICK = 188 /* , */,
1003
- kUNTK = mSHIFT | 188 /* , */,
999
+ kCYCL = 74 /* J */,
1000
+ kCNTR = 188 /* , */,
1001
+ kSCRL = mSHIFT | 74 /* SHIFT+J */,
1002
+ kTICK = 72 /* H */,
1003
+ kUNTK = mSHIFT | 72 /* SHIFT+H */,
10041004
kCPYH = 66 /* B */,
10051005
kCPYB = mSHIFT | 66 /* SHIFT+B */,
1006
- kTMLN = 74 /* J */,
1007
- kTMLB = mSHIFT | 74 /* J */,
1006
+ kTMLN = 76 /* L */,
1007
+ kTMLB = mSHIFT | 76 /* SHIFT+L */,
10081008
kVIEW = 75 /* K */,
10091009
kDONE = 27 /* ESC */,
10101010
mod = evt.altKey<<15 | evt.ctrlKey<<14 | evt.shiftKey<<13,
10111011
key = ( evt.which || evt.keyCode ) | mod;
10121012
var dx = 0;
10131013
--- src/graph.js
+++ src/graph.js
@@ -994,19 +994,19 @@
994 mSHIFT = 1<<13,
995 kFRST = mSHIFT | 78 /* SHIFT+N */,
996 kNEXT = 78 /* N */,
997 kPREV = 77 /* M */,
998 kLAST = mSHIFT | 77 /* SHIFT+M */,
999 kCYCL = 72 /* H */,
1000 kCNTR = 190 /* . */,
1001 kSCRL = mSHIFT | 72 /* H */,
1002 kTICK = 188 /* , */,
1003 kUNTK = mSHIFT | 188 /* , */,
1004 kCPYH = 66 /* B */,
1005 kCPYB = mSHIFT | 66 /* SHIFT+B */,
1006 kTMLN = 74 /* J */,
1007 kTMLB = mSHIFT | 74 /* J */,
1008 kVIEW = 75 /* K */,
1009 kDONE = 27 /* ESC */,
1010 mod = evt.altKey<<15 | evt.ctrlKey<<14 | evt.shiftKey<<13,
1011 key = ( evt.which || evt.keyCode ) | mod;
1012 var dx = 0;
1013
--- src/graph.js
+++ src/graph.js
@@ -994,19 +994,19 @@
994 mSHIFT = 1<<13,
995 kFRST = mSHIFT | 78 /* SHIFT+N */,
996 kNEXT = 78 /* N */,
997 kPREV = 77 /* M */,
998 kLAST = mSHIFT | 77 /* SHIFT+M */,
999 kCYCL = 74 /* J */,
1000 kCNTR = 188 /* , */,
1001 kSCRL = mSHIFT | 74 /* SHIFT+J */,
1002 kTICK = 72 /* H */,
1003 kUNTK = mSHIFT | 72 /* SHIFT+H */,
1004 kCPYH = 66 /* B */,
1005 kCPYB = mSHIFT | 66 /* SHIFT+B */,
1006 kTMLN = 76 /* L */,
1007 kTMLB = mSHIFT | 76 /* SHIFT+L */,
1008 kVIEW = 75 /* K */,
1009 kDONE = 27 /* ESC */,
1010 mod = evt.altKey<<15 | evt.ctrlKey<<14 | evt.shiftKey<<13,
1011 key = ( evt.which || evt.keyCode ) | mod;
1012 var dx = 0;
1013
+7 -7
--- src/timeline.c
+++ src/timeline.c
@@ -1634,19 +1634,19 @@
16341634
**
16351635
** N Focus first (newest) entry.
16361636
** n Focus next (newer) entry, or open next page.
16371637
** m Focus previous (older) entry, or open previous page.
16381638
** M Focus last (oldest) entry.
1639
-** h Move focus between selected, current (check-out) and ticked entries.
1640
-** . Focus entry closest to center of viewport.
1641
-** H Scroll to focused entry.
1642
-** , Tick/untick node of focused entry, or open diff if two nodes ticked.
1643
-** ; Untick nodes of all entries.
1639
+** j Move focus between selected, current (check-out) and ticked entries.
1640
+** , Focus entry closest to center of viewport.
1641
+** J Scroll to focused entry.
1642
+** h Tick/untick node of focused entry, or open diff if two nodes ticked.
1643
+** H Untick nodes of all entries.
16441644
** b Copy the commit hash of the focused entry to clipboard.
16451645
** B Copy the branch name of the focused entry to clipboard.
1646
-** j View timeline of focused entry.
1647
-** J View timeline of focused entry filtered by branch.
1646
+** l View timeline of focused entry.
1647
+** L View timeline of focused entry filtered by branch.
16481648
** k View details of focused entry.
16491649
** ESC Disable keyboard navigation mode.
16501650
*/
16511651
void page_timeline(void){
16521652
Stmt q; /* Query used to generate the timeline */
16531653
--- src/timeline.c
+++ src/timeline.c
@@ -1634,19 +1634,19 @@
1634 **
1635 ** N Focus first (newest) entry.
1636 ** n Focus next (newer) entry, or open next page.
1637 ** m Focus previous (older) entry, or open previous page.
1638 ** M Focus last (oldest) entry.
1639 ** h Move focus between selected, current (check-out) and ticked entries.
1640 ** . Focus entry closest to center of viewport.
1641 ** H Scroll to focused entry.
1642 ** , Tick/untick node of focused entry, or open diff if two nodes ticked.
1643 ** ; Untick nodes of all entries.
1644 ** b Copy the commit hash of the focused entry to clipboard.
1645 ** B Copy the branch name of the focused entry to clipboard.
1646 ** j View timeline of focused entry.
1647 ** J View timeline of focused entry filtered by branch.
1648 ** k View details of focused entry.
1649 ** ESC Disable keyboard navigation mode.
1650 */
1651 void page_timeline(void){
1652 Stmt q; /* Query used to generate the timeline */
1653
--- src/timeline.c
+++ src/timeline.c
@@ -1634,19 +1634,19 @@
1634 **
1635 ** N Focus first (newest) entry.
1636 ** n Focus next (newer) entry, or open next page.
1637 ** m Focus previous (older) entry, or open previous page.
1638 ** M Focus last (oldest) entry.
1639 ** j Move focus between selected, current (check-out) and ticked entries.
1640 ** , Focus entry closest to center of viewport.
1641 ** J Scroll to focused entry.
1642 ** h Tick/untick node of focused entry, or open diff if two nodes ticked.
1643 ** H Untick nodes of all entries.
1644 ** b Copy the commit hash of the focused entry to clipboard.
1645 ** B Copy the branch name of the focused entry to clipboard.
1646 ** l View timeline of focused entry.
1647 ** L View timeline of focused entry filtered by branch.
1648 ** k View details of focused entry.
1649 ** ESC Disable keyboard navigation mode.
1650 */
1651 void page_timeline(void){
1652 Stmt q; /* Query used to generate the timeline */
1653

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button