Fossil

Check-in [a4db0b2cfa]
Login

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

Overview
Comment:Shortcut SHIFT+"," (comma) to untick all (better: one) node(s) without moving the focus indicator.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | timeline-keyboard-navigation
Files: files | file ages | folders
SHA3-256: a4db0b2cfa91197581671970d9ff614c174211056a652654263043260ab1073e
User & Date: florian 2022-08-04 04:11:00.000
Context
2022-08-04
04:25
Change the "untick" and "copy hash/branch" handlers to not activate keyboard navigation mode, i.e. "untick" is also available in combination with mouse scrolling, and "copy hash/branch" requires a focused entry, instead of focusing an entry without copying its data. ... (check-in: 1d5e6e3cae user: florian tags: timeline-keyboard-navigation)
04:11
Shortcut SHIFT+"," (comma) to untick all (better: one) node(s) without moving the focus indicator. ... (check-in: a4db0b2cfa user: florian tags: timeline-keyboard-navigation)
04:01
Remap the shortcut to disable keyboard navigation mode to ESC. This is also a test case for the high-priority ESC handlers of the timeline tooltip and the hamburger menu, and things seem to work fine. ... (check-in: 80085809ac user: florian tags: timeline-keyboard-navigation)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
942
943
944
945
946
947
948

949
950
951
952
953
954
955
956
957
958
959
960
961
962
963

964
965
966
967
968
969
970
        mSHIFT = 1<<13,
        kFRST = mSHIFT | 78 /* SHIFT+N */,
        kNEXT = 78 /* N */,
        kPREV = 77 /* M */,
        kLAST = mSHIFT | 77 /* SHIFT+M */,
        kCYCL = 72 /* H */,
        kTICK = 188 /* , */,

        kCPYH = 66 /* B */,
        kCPYB = mSHIFT | 66 /* SHIFT+B */,
        kTMLN = 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;
        case kNEXT: dx = -1; break;
        case kPREV: dx = +1; break;
        case kLAST: dx = +2; break;
        case kCYCL: break;
        case kTICK: break;

        case kCPYH: break;
        case kCPYB: break;
        case kTMLN: break;
        case kVIEW: break;
        case kDONE: break;
        default: return;
      }







>















>







942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
        mSHIFT = 1<<13,
        kFRST = mSHIFT | 78 /* SHIFT+N */,
        kNEXT = 78 /* N */,
        kPREV = 77 /* M */,
        kLAST = mSHIFT | 77 /* SHIFT+M */,
        kCYCL = 72 /* H */,
        kTICK = 188 /* , */,
        kUNTK = mSHIFT | 188 /* , */,
        kCPYH = 66 /* B */,
        kCPYB = mSHIFT | 66 /* SHIFT+B */,
        kTMLN = 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;
        case kNEXT: dx = -1; break;
        case kPREV: dx = +1; break;
        case kLAST: dx = +2; break;
        case kCYCL: break;
        case kTICK: break;
        case kUNTK: break;
        case kCPYH: break;
        case kCPYB: break;
        case kTMLN: break;
        case kVIEW: break;
        case kDONE: break;
        default: return;
      }
986
987
988
989
990
991
992







993
994
995
996
997
998
999
          else if( id==cur ) id = tik || sel || cur;
          else if( id==tik ) id = sel || cur || tik;
          else id = sel || cur || tik || id;
        }
        else if( key==kTICK ){
          var gn = document.getElementById('tln'+id.slice(1));
          if( gn ) gn.click();







        }
        else if( key==kCPYH || key==kCPYB ){
          var ri = timelineGetRowInfo(id);
          if( ri ){
            copyTextToClipboard(
              key==kCPYH ? ri.hash.slice(0,ri.hashdigits) : ri.branch);
          }







>
>
>
>
>
>
>







988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
          else if( id==cur ) id = tik || sel || cur;
          else if( id==tik ) id = sel || cur || tik;
          else id = sel || cur || tik || id;
        }
        else if( key==kTICK ){
          var gn = document.getElementById('tln'+id.slice(1));
          if( gn ) gn.click();
        }
        else if( key==kUNTK ){
          var tid = focusTickedId();
          if( tid ){
            var gn = document.getElementById('tln'+tid.slice(1));
            if( gn ) gn.click();
          }
        }
        else if( key==kCPYH || key==kCPYB ){
          var ri = timelineGetRowInfo(id);
          if( ri ){
            copyTextToClipboard(
              key==kCPYH ? ri.hash.slice(0,ri.hashdigits) : ri.branch);
          }