Check-in [15f943f0c2]
Not logged in

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

Overview
Comment:Shortcut "," (comma) to tick/untick the node of the currently focused entry. This has the same effect as mouse clicks, i.e. as soon as two nodes are ticked, the corresponding diff page is opened.
Timelines: family | ancestors | descendants | both | timeline-keyboard-navigation
Files: files | file ages | folders
SHA3-256: 15f943f0c2f062c676e14fc37381e0f5ec544a9d04b2b9c0dfd64cc8e53f0c5e
User & Date: florian 2022-08-04 03:45:00.000
Context
2022-08-04
03:51
Shortcuts B and SHIFT+B top copy the hash or branch name of the focused entry to clipboard. check-in: f23a6d13a2 user: florian tags: timeline-keyboard-navigation
03:45
Shortcut "," (comma) to tick/untick the node of the currently focused entry. This has the same effect as mouse clicks, i.e. as soon as two nodes are ticked, the corresponding diff page is opened. check-in: 15f943f0c2 user: florian tags: timeline-keyboard-navigation
03:41
Shortcuts SHIFT+N and SHIFT+M to put focus the first (topmost) or last (bottommost) entry. check-in: 145df5a3e1 user: florian tags: timeline-keyboard-navigation
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
925
926
927
928
929
930
931

932
933
934
935
936
937
938
939
940
941
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
      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 */,

        kTMLN = 74 /* J */,
        kVIEW = 75 /* K */,
        kDONE = 76 /* L */,
        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 kTMLN: break;
        case kVIEW: break;
        case kDONE: break;
        default: return;
      }
      if( key==kDONE ){
        focusCacheSet(null);
        focusVisualize(null,false);
        document.cookie =
          'fossil_timeline_kbnav=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
        return;
      }
      document.cookie = 'fossil_timeline_kbnav=1;path=/';
      var id = focusCacheGet();
      if( id && dx==0 ){





        var ri = timelineGetRowInfo(id);
        if( ri ){
          var page = key==kVIEW ? '/info/' : '/timeline?c=';
          var href = ri.baseurl + page + encodeURIComponent(ri.hash);
          if( href!=location.href.slice(-href.length) ){
            location.href = href;
            return;

          }
        }
      }
      else if ( id && dx!=0 ){
        id = focusNextId(id,dx);
        if( id && !document.getElementById(id) ){
          var btn =







>











>















>
>
>
>
>
|
|
|
|
|
|
|
>







925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
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
973
974
975
976
977
978
979
      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 */,
        kTICK = 188 /* , */,
        kTMLN = 74 /* J */,
        kVIEW = 75 /* K */,
        kDONE = 76 /* L */,
        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 kTICK: break;
        case kTMLN: break;
        case kVIEW: break;
        case kDONE: break;
        default: return;
      }
      if( key==kDONE ){
        focusCacheSet(null);
        focusVisualize(null,false);
        document.cookie =
          'fossil_timeline_kbnav=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
        return;
      }
      document.cookie = 'fossil_timeline_kbnav=1;path=/';
      var id = focusCacheGet();
      if( id && dx==0 ){
        if( key==kTICK ){
          var gn = document.getElementById('tln'+id.slice(1));
          if( gn ) gn.click();
        }
        else/* if( key==kTMLN || key==kVIEW )*/{
          var ri = timelineGetRowInfo(id);
          if( ri ){
            var page = key==kVIEW ? '/info/' : '/timeline?c=';
            var href = ri.baseurl + page + encodeURIComponent(ri.hash);
            if( href!=location.href.slice(-href.length) ){
              location.href = href;
              return;
            }
          }
        }
      }
      else if ( id && dx!=0 ){
        id = focusNextId(id,dx);
        if( id && !document.getElementById(id) ){
          var btn =