Fossil

Check-in [b6a656b520]
Login

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

Overview
Comment:Fix the shortcut handler to cycle between selected, check-out and ticked entries getting stuck, and give highest priority to ticked entries.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | timeline-keyboard-navigation
Files: files | file ages | folders
SHA3-256: b6a656b520e6c7a4da57e1425e5d07d753ebb0a6e4b1f032e1679c33c5053197
User & Date: florian 2022-08-14 08:03:00.000
Context
2022-08-14
08:07
Cancel default actions and further bubbling of handled keys, in case of conflicts with browser (extension) defaults. ... (check-in: 5257960080 user: florian tags: timeline-keyboard-navigation)
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)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
1067
1068
1069
1070
1071
1072
1073












1074
1075
1076
1077
1078


1079




1080

1081
1082
1083
1084
1085
1086
1087
1088
1089
        focusCookieClear();
        return;
      }
      focusCookieInit();
      var id = focusCacheGet();
      if( id && dx==0 ){
        if( key==kCYCL ){












          var sel = focusSelectedId();
          var sl2 = focus2ndSelectedId();
          var cur = focusCurrentId();
          var tik = focusTickedId();
          if( id==sel ) id = sl2 || cur || tik || sel;


          else if( id==sl2 ) id = cur || tik || sel || sl2;




          else if( id==cur ) id = tik || sel || sl2 || cur;

          else if( id==tik ) id = sel || sl2 || cur || tik;
          else id = sel || sl2 || cur || tik || id;
        }
        else if( key==kTICK ){
          var gn = document.getElementById('tln'+id.slice(1));
          if( gn ) gn.click();
        }
        else/* if( key==kTMLN || key==kTMLB || key==kVIEW )*/{
          var ri = timelineGetRowInfo(id);







>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
>
>
|
>
>
>
>
|
>
|
<







1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100

1101
1102
1103
1104
1105
1106
1107
        focusCookieClear();
        return;
      }
      focusCookieInit();
      var id = focusCacheGet();
      if( id && dx==0 ){
        if( key==kCYCL ){
          function uniqIds(){
            var a = Array.prototype.slice.call(arguments,0), k=[], v=[];
            for( var i=0; i<a.length; i++ ){
              if( a[i] && !(a[i] in k) ){
                k[a[i]] = 1;
                v.push(a[i]);
              }
            }
            return v;
          }
          var ids = uniqIds(
            focusTickedId(),
            focusSelectedId(),
            focus2ndSelectedId(),
            focusCurrentId()
          );
          if( ids.length>1 ){
            var m = 0;
            for( var i=0; i<ids.length; i++ ){
              if( id==ids[i] ){
                m = i<ids.length-1 ? i+1 : 0;
                break;
              }
            }
            id = ids[m];
          }
          else if( ids.length==1 ) id = ids[0];

        }
        else if( key==kTICK ){
          var gn = document.getElementById('tln'+id.slice(1));
          if( gn ) gn.click();
        }
        else/* if( key==kTMLN || key==kTMLB || key==kVIEW )*/{
          var ri = timelineGetRowInfo(id);