Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add shortcuts #31

Open
rrd108 opened this issue Dec 24, 2019 · 1 comment
Open

add shortcuts #31

rrd108 opened this issue Dec 24, 2019 · 1 comment
Milestone

Comments

@rrd108
Copy link
Owner

rrd108 commented Dec 24, 2019

like Ctrl + N add-invoice

@rrd108 rrd108 added this to the 1.1 milestone Dec 24, 2019
@rrd108
Copy link
Owner Author

rrd108 commented Dec 26, 2019

created() {
	window.addEventListener('keypress', this.doCommand);
},
destroyed() {
	window.removeEventListener('keypress', this.doCommand);
},
methods: {
	doCommand(e) {
		let cmd = String.fromCharCode(e.keyCode).toLowerCase();
		// do stuff
	}
}

if (e.key === "s" && (e.ctrlKey || e.metaKey)) {

rrd108 added a commit that referenced this issue Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant