Fossil

Check-in [29824137be]
Login

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

Overview
Comment:Link keyboard and mouse navigation and enable changing keyboard focus with Ctrl+Click.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | timeline-keyboard-navigation
Files: files | file ages | folders
SHA3-256: 29824137be667a39ba034c8ac7cbee13d82cdb085345fd7ea993f76a398a7ed0
User & Date: florian 2022-09-25 07:35:00.000
Context
2022-10-01
06:48
Sync with trunk. ... (check-in: e5c5e6f0e9 user: florian tags: timeline-keyboard-navigation)
2022-09-25
07:35
Link keyboard and mouse navigation and enable changing keyboard focus with Ctrl+Click. ... (check-in: 29824137be user: florian tags: timeline-keyboard-navigation)
07:23
Sync with trunk. ... (check-in: 3c92971996 user: florian tags: timeline-keyboard-navigation)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
1147
1148
1149
1150
1151
1152
1153























1154
1155
1156
1157
1158
1159
1160
          return;
        }
      }
      else if ( !id ) id = focusDefaultId();
      focusCacheSet(id);
      focusVisualize(id,true);
    }/*,true*/);























    window.addEventListener('pageshow',function(evt){
      var id = focusCacheGet();
      if( !id || !focusVisualize(id,false) ){
        if( focusCookieQuery() ){
          id = focusDefaultId();
          focusCacheSet(id);
          focusVisualize(id,false);







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
          return;
        }
      }
      else if ( !id ) id = focusDefaultId();
      focusCacheSet(id);
      focusVisualize(id,true);
    }/*,true*/);
    // NOTE: To be able to override the default CTRL+CLICK behavior (to "select"
    // the elements, indicated by an outline) for normal (non-input) elements in
    // FF it's necessary to listen to `mousedown' instead of `click' events.
    window.addEventListener('mousedown',function(evt){
      var
        bMAIN = 0,
        mCTRL = 1<<14,
        mod = evt.altKey<<15 | evt.ctrlKey<<14 | evt.shiftKey<<13;
      if( evt.target.tagName in { 'INPUT':1, 'SELECT':1, 'A':1 } ||
          evt.button!=bMAIN || mod!=mCTRL ){
        return;
      }
      var e = evt.target;
      while( e && !/\btimeline\w+Cell\b/.test(e.className) ){
        e = e.parentElement;
      }
      if( e && (e = e.previousElementSibling.querySelector('.tl-nodemark')) ){
        evt.preventDefault();
        evt.stopPropagation();
        focusCacheSet(e.id);
        focusVisualize(e.id,false);
      }
    },false);
    window.addEventListener('pageshow',function(evt){
      var id = focusCacheGet();
      if( !id || !focusVisualize(id,false) ){
        if( focusCookieQuery() ){
          id = focusDefaultId();
          focusCacheSet(id);
          focusVisualize(id,false);
Changes to src/timeline.c.
1634
1635
1636
1637
1638
1639
1640


1641
1642
1643
1644
1645
1646
1647
**
**    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 focused entry, or open diff if two entries ticked.
**    H     Untick all entries.
**    b     Copy commit hash of focused entry to clipboard.
**    B     Copy branch name of focused entry to clipboard.
**    l     View timeline of focused entry.
**    L     View timeline of focused entry filtered by branch.







>
>







1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
**
**    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.
**    Ctrl+Click
**          Focus clicked entry.
**    J     Scroll to focused entry.
**    h     Tick/untick focused entry, or open diff if two entries ticked.
**    H     Untick all entries.
**    b     Copy commit hash of focused entry to clipboard.
**    B     Copy branch name of focused entry to clipboard.
**    l     View timeline of focused entry.
**    L     View timeline of focused entry filtered by branch.