QOwnNotes
QOwnNotes copied to clipboard
QOwnNotes doesn't follow Mac's custom key binding with "Home"/"End"
I have changed the mapping of "Home"/"End" to "BeginningOfLine"/"EndOfLine"
~$ cat ~/Library/KeyBindings/DefaultKeyBinding.dict
{
/* Remap Home / End keys to be correct */
"\UF729" = "moveToBeginningOfLine:"; /* Home */
"\UF72B" = "moveToEndOfLine:"; /* End */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */
"^\UF729" = "moveToBeginningOfDocument:"; /* Ctrl + Home */
"^\UF72B" = "moveToEndOfDocument:"; /* Ctrl + End */
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:"; /* Shift + Ctrl + Home */
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:"; /* Shift + Ctrl + End */
}
Expected behaviour
QOwnNotes will follow the Mac's key binding
Actual behaviour
When press "Home" in QOwnNotes, the cursor jumps to the begin of the whole text.
Steps to reproduce
- use the key binding
- press Home/End
I guess that would need to be handled by the Qt framework directly. A QPlainTextEdit widget is used as note edit widget. Does your custom settings work in other Qt apps you know of?
Not sure how to deal with Qt's setting. This is the only Qt app I have now.
In my memory, it seems that other Qt app (say, TortoiseHg which is based PyQT) didn't follow the key mapping, either.
Is there any way to bypass? Thanks.
Is there any way to bypass?
None that I'm aware of without implementing your exact needed behavior. Have your researched on the internet already?
I found Qt related bugs.
https://bugreports.qt.io/browse/QTBUG-5919 https://bugreports.qt.io/browse/QTBUG-393
It seems that no one wants to fix it ...
ps: QtCreator said that it has some customized key binding inside the app (https://bugreports.qt.io/browse/QTCREATORBUG-61) . If there is an app-level key binding setting, then user can customize the keys.
I found Qt related bugs.
You could watch those bugs and report back if something changes. Maybe you also want to comment on the bugs / missing features so they see you are interested in a solution. ;)
QtCreator said that it has some customized key binding inside the app.
The only keybindings I'm aware of are those of QAction objects. How keys are responding in a QPlainTextEdit needs to be hard-coded with constants. Do you have more information or examples?
Also see https://github.com/pbek/QOwnNotes/issues/1593 and https://github.com/pbek/QOwnNotes/issues/2643.