Blueprint: Allow for sequencing hotkeys

Created on 9 Mar 2017  路  12Comments  路  Source: palantir/blueprint

Would be a useful feature to have hotkey sequences in addition to combos.
Ex: dd in vim to delete.

core feature request help wanted

All 12 comments

great idea but low priority for the team. would happily accept contributions though.

This would indeed be a nice addition, I love the clean implementation of HotKeys right now, sequencing would be a welcome addition. I feel that sequencing in web apps feels more natural than modifier keys, using modifier keys always gives me the feeling i'm invoking functionality from my browser, not the webapp i'm using. For webapps key sequences (shift > shift for search for example) feels more natural.

@chrisramakers any interest in building this feature out? it's not a priority for the team so we're going to have to rely on contributions for this in the short term.

@giladgray I'd love to but I'd be diving head first into unknown territory, I've got enough experience programming but i'm only just exploring react and es6/typescript ... but this might be a good opportunity to learn ... are there and guidelines on developing for blueprint?

Hey @giladgray could I take this on? I think within a week or two I should be able to provide you with an update on my progress or let you know if I think that I can't handle it.

@shounak7 heck you you can take this on! go for it. the Hotkeys code could likely use some refactors due to its age, so feel free to clean it up as necessary.

So I tried to run yarn on the repo after cloning it and creating a new branch on my computer and I got this error: `error /home/shounak/blueprint/node_modules/oniguruma: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /home/shounak/blueprint/node_modules/oniguruma
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/home/shounak/blueprint/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/shounak/blueprint/node_modules/oniguruma/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/shounak/blueprint/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/shounak/.node-gyp/8.12.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/shounak/.node-gyp/8.12.0',
gyp info spawn args '-Dnode_gyp_dir=/home/shounak/blueprint/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/shounak/.node-gyp/8.12.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/shounak/blueprint/node_modules/oniguruma',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/home/shounak/blueprint/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/home/shounak/blueprint/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/home/shounak/blueprint/node_modules/which/which.js:80:29)
gyp ERR! stack at /home/shounak/blueprint/node_modules/which/which.js:89:16
gyp ERR! stack at /home/shounak/blueprint/node_modules/isexe/index.js:42:5
gyp ERR! stack at /home/shounak/blueprint/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.15.0-36-generic
gyp ERR! command "/usr/bin/node" "/home/shounak/blueprint/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /home/shounak/blueprint/node_modules/oniguruma

`
After doing some googling, this looks like a known error or a common error. Do you know how I can workaround this? Thanks @giladgray

never mind, figured it out. had to run $ sudo apt-get install build-essential

alright, new issue on the yarn verify now. any advice?

`
shounak@shounak:~/blueprint$ yarn verify
yarn run v1.10.1
$ npm-run-all -s compile dist:libs dist:apps -p test lint
$ lerna run compile
lerna info version 2.11.0
lerna info versioning independent
$ tsc -p ./src
lerna ERR! compile Errored while running script in '@blueprintjs/tslint-config'
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: yarn run compile
lerna ERR! error Command failed with exit code 2.
lerna ERR! $ tsc -p ./src
lerna ERR! ../../node_modules/tsutils/typeguard/2.9/node.d.ts:3:69 - error TS2694: Namespace 'ts' has no exported member 'ImportTypeNode'.
lerna ERR!
lerna ERR! 3 export declare function isImportTypeNode(node: ts.Node): node is ts.ImportTypeNode;
lerna ERR! ~~~~~~
lerna ERR!
lerna ERR!
lerna ERR! info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR!
lerna ERR! at Promise.all.then.arr (/home/shounak/blueprint/node_modules/execa/index.js:236:11)
lerna ERR! at
{ Error: Command failed: yarn run compile
error Command failed with exit code 2.
$ tsc -p ./src
../../node_modules/tsutils/typeguard/2.9/node.d.ts:3:69 - error TS2694: Namespace 'ts' has no exported member 'ImportTypeNode'.

3 export declare function isImportTypeNode(node: ts.Node): node is ts.ImportTypeNode;
~~~~~~

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

at Promise.all.then.arr (/home/shounak/blueprint/node_modules/execa/index.js:236:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)

code: 1,
killed: false,
stdout: '$ tsc -p ./src\n\u001b[96m../../node_modules/tsutils/typeguard/2.9/node.d.ts\u001b[0m:\u001b[93m3\u001b[0m:\u001b[93m69\u001b[0m - \u001b[91merror\u001b[0m\u001b[90m TS2694: \u001b[0mNamespace \'ts\' has no exported member \'ImportTypeNode\'.\n\n\u001b[30;47m3\u001b[0m export declare function isImportTypeNode(node: ts.Node): node is ts.ImportTypeNode;\n\u001b[30;47m \u001b[0m \u001b[91m ~~~~~~\u001b[0m\n\n\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n',
stderr: 'error Command failed with exit code 2.\n',
failed: true,
signal: null,
cmd: 'yarn run compile',
timedOut: false,
exitCode: 1 }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "compile" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
`

hey @giladgray let me know if you know anything about the above error

Hey, just a heads up, I'm not planning on working on this anymore

i think i fixed that error in #3078, if you want to try updating to latest develop.

Was this page helpful?
0 / 5 - 0 ratings