CotEditor
CotEditor copied to clipboard
Add 'Move to Begin of line' and 'Move to End of line' shortcuts
Current issue
I'm always frustrated ... when I press Home or End keys when using CotEditor. If shortcuts for both begin and end of line were added, that wouldn't be an issue anymore.
The solution you'd like
Add to Preferences > Shortcuts > Edition an entry for Begin of line and another entry for End of line. Thanks.
Alternatives you've considered
Don't really want to use a 3rd party tool to remap keys if that behavior could be managed by CotEditor itself.
CotEditor version
4.8.7 (657)
macOS version
Sonoma 14.5
Additional context
No response
Thank you for the request.
I have been thinking about customizing such implicit Emacs-style key bindings for a long time, but have yet to come up with a clean solution. Let me have more time.
Perfect. Thank you.
on mac os, traditionally you fix this in the ~/Library/KeyBindings/DefaultKeyBinding.dict which works for CotEditor
~/Library/KeyBindings/DefaultKeyBinding.dict
{
"\UF729" = "moveToBeginningOfLine:"; /* home */
"\UF72B" = "moveToEndOfLine:"; /* end */
"\UF72C" = "pageUp:"; /* page-up */
"\UF72D" = "pageDown:"; /* page-down */
}
It works!!!
Thanks a lot, mccoma.
on mac os, traditionally you fix this in the ~/Library/KeyBindings/DefaultKeyBinding.dict which works for CotEditor
~/Library/KeyBindings/DefaultKeyBinding.dict
{ "\UF729" = "moveToBeginningOfLine:"; /* home */ "\UF72B" = "moveToEndOfLine:"; /* end */ "\UF72C" = "pageUp:"; /* page-up */ "\UF72D" = "pageDown:"; /* page-down */ }
To give some references for other changes people make:
https://web.archive.org/web/20160314030051/http://osxnotes.net/keybindings.html
https://developer.apple.com/documentation/appkit/nsstandardkeybindingresponding?language=objc
hope this helps you go further
Hi, I've also been looking forward to this feature for a long time.
Thanks @mccoma, for providing a great workaround.