cutcode icon indicating copy to clipboard operation
cutcode copied to clipboard

User binded hotkey + click

Open Ethicmeta opened this issue 8 years ago • 5 comments

The double click feature works well, however some people (including myself) use double click to quickly highlight just a method, or triple click for the line.

Having a user defined hotkey + left click to trigger the copy would go a long way for UX.

I've tried to implement this myself, however I ran into issues capturing the ascii characters for non alphanumeric keys. This feature would take place primarily in settings.js/usersettings.html and would need special attention to sanitizing input.

alternatively, we can create a dropdown box with control, alt, or shift as an input and left click as default. This would allow us to widen the options and would make capturing the ascii input a moot point.

Ethicmeta avatar Mar 21 '17 17:03 Ethicmeta

We could try using something like mousetrap to help us with the hotkeys.

Update: The record plugin is what we would want to use. I can try to set this up over the next day or two.

willbiddy avatar Mar 21 '17 19:03 willbiddy

Great, cant wait to see what you come up with :) @willbiddy

Ethicmeta avatar Mar 22 '17 15:03 Ethicmeta

I'm having some trouble with this, so If someone else wants to try feel free to.

I tried adding some new buttons to the settings page and for some reason they all acted like the save button, and I couldn't really get past that part.

willbiddy avatar Mar 23 '17 20:03 willbiddy

@willbiddy can you update your repo (make a dev branch if you havent already and push your current build there). I'll take a look at it and see if I can't help around this particular issue!

Ethicmeta avatar Mar 23 '17 20:03 Ethicmeta

Ok, I created a pr with my code. Basically, I added in some new buttons (one to change the hotkey and one to reset the hotkey) and they both act the same as the save button does. They both say "Saved!" below when you press them and I couldn't get that to change.

willbiddy avatar Mar 23 '17 23:03 willbiddy