Tuesday, April 18, 2017

What controls the list of characters that stop Ctrl+Arrow movements?

In most Windows text fields, you can hold Control while pressing left or right to advance by a word instead of by a single character. Not all non-alphanumeric characters break up words, though. For example, the plus sign is a separator but the underscore is not.

This separation, as well as word wrapping, is managed by the text box's word-breaking procedure, a Win32 function. Windows supplies the one used by most text boxes, but applications can use the EM_SETWORDBREAKPROC window message to make an edit control use a different one. Therefore, if you want to change either of those features, you'd need to write a program that injects itself into each running application and changes the work-break procedure to one of your choosing.

Based on my Super User answer.

No comments:

Post a Comment