Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Keyboard Shortcuts (under the Task Menu) don't work #7

Open
mountainash opened this issue Mar 22, 2020 · 3 comments
Open

Keyboard Shortcuts (under the Task Menu) don't work #7

mountainash opened this issue Mar 22, 2020 · 3 comments

Comments

@mountainash
Copy link

No actions are triggered.

@mountainash
Copy link
Author

I tried to re-create the keyboard short-cuts that Asana has as I figure they’ll be unlikely to change. But every time I trigger a TAB key, their website has an error and needs reloading. I’ll keep trying.

var _tab_on = new KeyboardEvent('keydown', {
    key: 'Tab',
    code: 'tab',
    keyCode: 9,
    which: 9
});
document.dispatchEvent(_tab_on);

@mountainash
Copy link
Author

Looking into the 14.8 MB !!!! Javascript file running Asana - https://d3ki9tyy5l5ruj.cloudfront.net/compressed/build/bundles/c62a8798bcbcee63f855772110bf2f2b3dabc013/apps/asana/bundle.js to see what can be hooked on to.

14.8 MB... need to make sure that Taskana is caching - that's massive!

@mountainash
Copy link
Author

So Asana is written in React making it very hard to hook to anything solid inside the minified code. Went back to trying to recreate keyboard combos in Javascript. It's possible, but Asana still doesn't like the Tab key. Here's a little keycombo trigger script:

function keySequence(keys) {
  for (var keys = keys.split(' '); keys.length;) {
    nextKey = keys.shift();
    window.dispatchEvent(new KeyboardEvent('keydown', {key: nextKey}))
  }
}
keySequence('Tab q');

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant