Skip to content

Change the CTRL+DELETE behaviour to delete the next word #4815

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

Merged
merged 2 commits into from
Apr 7, 2016

Conversation

ar-vargas
Copy link
Contributor

According to #4778 , this restores the "normal" behaviour for the KeyStroke (CTRL | Command) + DELETE to delete only one word in front of cursor instead of the rest of the line.

@ivanebernal
Copy link
Contributor

The keyStroke does delete the word in front of the caret. LGTM.

@ar-vargas
Copy link
Contributor Author

@cmaglie Could you take a look at this? I had some free time at work but now I think I could not take more time for the project.
Thanks!

@cmaglie
Copy link
Member

cmaglie commented Apr 6, 2016

Thanks for the patch!

I tested and it works for Windows and Linux, but it should be handled differently for MacOSX: right now the short-cut is set as Cmd+Delete (since MacOSX uses Cmd instead of Ctrl as MenuShortcutKeyMask) but it really should be Alt+Delete.

Could you fix this? you can use the method OSUtils.isMacOS() to check if the IDE is running on MacOSX.

@cmaglie cmaglie added feature request A request to make an enhancement (not a bug fix) Component: IDE user interface The Arduino IDE's user interface labels Apr 6, 2016
@ar-vargas ar-vargas force-pushed the ctrlDeleteBehavior branch 3 times, most recently from 54f01e3 to a70bab3 Compare April 6, 2016 21:17
@ar-vargas
Copy link
Contributor Author

It now works on OSX.

@cmaglie cmaglie merged commit a70bab3 into arduino:master Apr 7, 2016
@cmaglie
Copy link
Member

cmaglie commented Apr 7, 2016

Thank you!

@cmaglie cmaglie added this to the Release 1.6.9 milestone Apr 7, 2016
@dtwaddell
Copy link

Thanks @avargas-nearsoft and @cmaglie! :D

@matthijskooijman
Copy link
Collaborator

Hm, I wonder if it would be cleaner to change this in https://github.com/arduino/Arduino/blob/master/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java instead? AFAICS that's where the other Arduino-specific input map changes are made, and having a single one of them in some random method somewhere else just causes confusion...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE user interface The Arduino IDE's user interface feature request A request to make an enhancement (not a bug fix)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants