Fossil

Check-in [11bb41e09e]
Login

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

Overview
Comment:Check the meta key modifier (⊞|⌘|◆) when processing keyboard events.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | timeline-keyboard-navigation
Files: files | file ages | folders
SHA3-256: 11bb41e09e47b3bee505c9724e918749b0235f449dcea63e1d84d805f541360d
User & Date: florian 2022-10-03 11:18:00.000
Context
2022-10-30
12:53
Fix a bug when handling timeline data blocks not containing any check-ins. ... (Leaf check-in: d3f9b8ab78 user: florian tags: timeline-keyboard-navigation)
2022-10-03
11:18
Check the meta key modifier (⊞|⌘|◆) when processing keyboard events. ... (check-in: 11bb41e09e user: florian tags: timeline-keyboard-navigation)
2022-10-02
09:15
Shortcuts G and SHIFT+G to load the default timeline, or the timeline around the current check-out. ... (check-in: 2ed74216fb user: florian tags: timeline-keyboard-navigation)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
        kCPYB = mSHIFT | 66 /* SHIFT+B */,
        kTMLN = 76 /* L */,
        kTMLB = mSHIFT | 76 /* SHIFT+L */,
        kVIEW = 75 /* K */,
        kVDEF = 71 /* G */,
        kVCUR = mSHIFT | 71 /* SHIFT+G */,
        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;







|







1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
        kCPYB = mSHIFT | 66 /* SHIFT+B */,
        kTMLN = 76 /* L */,
        kTMLB = mSHIFT | 76 /* SHIFT+L */,
        kVIEW = 75 /* K */,
        kVDEF = 71 /* G */,
        kVCUR = mSHIFT | 71 /* SHIFT+G */,
        kDONE = 27 /* ESC */,
        mod = evt.altKey<<15|evt.ctrlKey<<14|evt.shiftKey<<13|evt.metaKey<<12,
        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;
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
    // 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;







|







1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
    // 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|evt.metaKey<<12;
      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;