Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

andrecamapum

macrumors newbie
Original poster
Sep 4, 2019
1
0
I'm just new in Mac (macOS Mojave 10.14.6 - MacBook Pro 15", 2019) because besides being more ergonomic, it has some specific keys used in my language. In addition there are some other very useful keys: "print screen", "page up", "page down", "home" and "end". Unfortunately I found that they are not automatically set when plugging the keyboard into the macbook. First I made a configuration (there was no file or directory, so I had to create them) in KeyBinding/DefaultKeyBinding.dict as follows:
{
"\ UF729" = "moveToBeginningOfLine:";
"$ \ UF729" = "moveToBeginningOfLineAndModifySelection:";
"\ UF72B" = "moveToEndOfLine:";
"$ \ UF72B" = "moveToEndOfLineAndModifySelection:";
"\ UF72C" = "pageUp:";
"\ UF72D" = "pageDown:";
}

Everything worked perfectly for a while, but suddenly the setting no longer worked. During this time I just tried to install a GUI for tesseract, apache-maven, a latex editor, and a program that uses emacs interface. I have no idea what happened. I tried to redo the file, but it didn't work. I tried the app "KeyFixer" also unsuccessfully. Karabiner worked for the "page up" and "page down" keys, but the "home" and "end" keys don't work like windows. I would like them to work like this:

end: end of current line
home: start of current line
ctrl + end: end of document
ctrl + home: start of document

I would also that like the shift key combined with any of the above shortcuts to select the text in focus.
 
You do realize, that these functions already exist?
opt+arrow left is move one word left
opt+arrow right one word right
cmd+left move to start of the line
cmd+right move to end of line
cmd+up move to start of the document
cmd+down move to end of document
So why remapping them?

They are listed here: https://support.apple.com/en-us/HT201236 under Documents shortcuts. For some reasons, Cheatsheet, which lists currently available shortcuts does not list them and they do now show in Preferences>Keyboard>Shortcuts also.

It is useful to use the Preferences to map shortcuts, at least one has chance to find them ;-)
 
You plugged a standard USB keyboard into a Mac and the Home/End keys didn't ALREADY work as they should, without having to mess with Karabiner Elements? The laptops don't have Home/End, so I can understand why you would use an external keyboard if those are important to you.

A keyboard is a keyboard. Usually you want to use Karabiner Elements to put Mac-specific keys on a 101-key keyboard, not the reverse. You're trying to hard-override them to send different keycodes.

Cursor motion keys on the Mac are usually application specific. For example, in Word Home/End do what you'd expect them to if you were using Windows, but in Textmate or BBEdit they don't do anything and they use Cmd and Opt. But they both DO obey PgUp/PgDown.

Terminal has them mapped to start-of-scroll-area and end-of-scroll-area.
 
You do realize, that these functions already exist?
opt+arrow left is move one word left
opt+arrow right one word right
cmd+left move to start of the line
cmd+right move to end of line
cmd+up move to start of the document
cmd+down move to end of document
So why remapping them?

They are listed here: https://support.apple.com/en-us/HT201236 under Documents shortcuts. For some reasons, Cheatsheet, which lists currently available shortcuts does not list them and they do now show in Preferences>Keyboard>Shortcuts also.

It is useful to use the Preferences to map shortcuts, at least one has chance to find them ;-)
Like me I suspect he would just prefer to hit the home key and it moves the cursor to the beginning of the line. Then when hitting the end key it moves to the end of the line.
 
I'm just new in Mac (macOS Mojave 10.14.6 - MacBook Pro 15", 2019) because besides being more ergonomic, it has some specific keys used in my language. In addition there are some other very useful keys: "print screen", "page up", "page down", "home" and "end". Unfortunately I found that they are not automatically set when plugging the keyboard into the macbook. First I made a configuration (there was no file or directory, so I had to create them) in KeyBinding/DefaultKeyBinding.dict as follows:
{
"\ UF729" = "moveToBeginningOfLine:";
"$ \ UF729" = "moveToBeginningOfLineAndModifySelection:";
"\ UF72B" = "moveToEndOfLine:";
"$ \ UF72B" = "moveToEndOfLineAndModifySelection:";
"\ UF72C" = "pageUp:";
"\ UF72D" = "pageDown:";
}

Everything worked perfectly for a while, but suddenly the setting no longer worked. During this time I just tried to install a GUI for tesseract, apache-maven, a latex editor, and a program that uses emacs interface. I have no idea what happened. I tried to redo the file, but it didn't work. I tried the app "KeyFixer" also unsuccessfully. Karabiner worked for the "page up" and "page down" keys, but the "home" and "end" keys don't work like windows. I would like them to work like this:

end: end of current line
home: start of current line
ctrl + end: end of document
ctrl + home: start of document

I would also that like the shift key combined with any of the above shortcuts to select the text in focus.
Hi.. did you ever find a solution to this issue? I'm still having the issue and I"m running an M1 Mac on Monterey. It used to work perfectly back in the day but no luck of late.
 
I'm having this same issue, I can map ctrl+home to moveToBeginningOfLine, but the unmodified home button remapping does not work for some reason. It continues to act as moveToBeginningOfDocument and ignores any override in DefaultKeyBinding.dict.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.