Fossil

Check-in [33f9315d44]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | timeline-keyboard-navigation
Files: files | file ages | folders
SHA3-256: 33f9315d44afd460b902e0e7a4c314a69275f847517a06f56a8ee9f54717b0d3
User & Date: florian 2022-08-14 07:56:00.000
Context
2022-08-14
08:03
Fix the shortcut handler to cycle between selected, check-out and ticked entries getting stuck, and give highest priority to ticked entries. ... (check-in: b6a656b520 user: florian tags: timeline-keyboard-navigation)
07:56
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. ... (check-in: 33f9315d44 user: florian tags: timeline-keyboard-navigation)
2022-08-11
06:42
Another attempt to make the CSS for the focus indicator work with any skin foreground and background colors and branch colors: instead of changing just the background color, the foreground color is also adjusted, so the indicator can still be recognized even if similar to a branch color. Besides, no more editing of SVG code is necessary to make adjustments. ... (check-in: a8d306bec6 user: florian tags: timeline-keyboard-navigation)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
      if( evt.target.tagName=='INPUT' ) return;
      var
        mSHIFT = 1<<13,
        kFRST = mSHIFT | 78 /* SHIFT+N */,
        kNEXT = 78 /* N */,
        kPREV = 77 /* M */,
        kLAST = mSHIFT | 77 /* SHIFT+M */,
        kCYCL = 72 /* H */,
        kCNTR = 190 /* . */,
        kSCRL = mSHIFT | 72 /* H */,
        kTICK = 188 /* , */,
        kUNTK = mSHIFT | 188 /* , */,
        kCPYH = 66 /* B */,
        kCPYB = mSHIFT | 66 /* SHIFT+B */,
        kTMLN = 74 /* J */,
        kTMLB = mSHIFT | 74 /* J */,
        kVIEW = 75 /* K */,
        kDONE = 27 /* ESC */,
        mod = evt.altKey<<15 | evt.ctrlKey<<14 | evt.shiftKey<<13,
        key = ( evt.which || evt.keyCode ) | mod;
      var dx = 0;
      switch( key ){
        case kFRST: dx = -2; break;







|
|
|
|
|


|
|







992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
      if( evt.target.tagName=='INPUT' ) return;
      var
        mSHIFT = 1<<13,
        kFRST = mSHIFT | 78 /* SHIFT+N */,
        kNEXT = 78 /* N */,
        kPREV = 77 /* M */,
        kLAST = mSHIFT | 77 /* SHIFT+M */,
        kCYCL = 74 /* J */,
        kCNTR = 188 /* , */,
        kSCRL = mSHIFT | 74 /* SHIFT+J */,
        kTICK = 72 /* H */,
        kUNTK = mSHIFT | 72 /* SHIFT+H */,
        kCPYH = 66 /* B */,
        kCPYB = mSHIFT | 66 /* SHIFT+B */,
        kTMLN = 76 /* L */,
        kTMLB = mSHIFT | 76 /* SHIFT+L */,
        kVIEW = 75 /* K */,
        kDONE = 27 /* ESC */,
        mod = evt.altKey<<15 | evt.ctrlKey<<14 | evt.shiftKey<<13,
        key = ( evt.which || evt.keyCode ) | mod;
      var dx = 0;
      switch( key ){
        case kFRST: dx = -2; break;
Changes to src/timeline.c.
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
**
** Keyboard navigation shortcuts:
**
**    N     Focus first (newest) entry.
**    n     Focus next (newer) entry, or open next page.
**    m     Focus previous (older) entry, or open previous page.
**    M     Focus last (oldest) entry.
**    h     Move focus between selected, current (check-out) and ticked entries.
**    .     Focus entry closest to center of viewport.
**    H     Scroll to focused entry.
**    ,     Tick/untick node of focused entry, or open diff if two nodes ticked.
**    ;     Untick nodes of all entries.
**    b     Copy the commit hash of the focused entry to clipboard.
**    B     Copy the branch name of the focused entry to clipboard.
**    j     View timeline of focused entry.
**    J     View timeline of focused entry filtered by branch.
**    k     View details of focused entry.
**    ESC   Disable keyboard navigation mode.
*/
void page_timeline(void){
  Stmt q;                            /* Query used to generate the timeline */
  Blob sql;                          /* text of SQL used to generate timeline */
  Blob desc;                         /* Description of the timeline */







|
|
|
|
|


|
|







1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
**
** Keyboard navigation shortcuts:
**
**    N     Focus first (newest) entry.
**    n     Focus next (newer) entry, or open next page.
**    m     Focus previous (older) entry, or open previous page.
**    M     Focus last (oldest) entry.
**    j     Move focus between selected, current (check-out) and ticked entries.
**    ,     Focus entry closest to center of viewport.
**    J     Scroll to focused entry.
**    h     Tick/untick node of focused entry, or open diff if two nodes ticked.
**    H     Untick nodes of all entries.
**    b     Copy the commit hash of the focused entry to clipboard.
**    B     Copy the branch name of the focused entry to clipboard.
**    l     View timeline of focused entry.
**    L     View timeline of focused entry filtered by branch.
**    k     View details of focused entry.
**    ESC   Disable keyboard navigation mode.
*/
void page_timeline(void){
  Stmt q;                            /* Query used to generate the timeline */
  Blob sql;                          /* text of SQL used to generate timeline */
  Blob desc;                         /* Description of the timeline */