Added a script to fix mapping of macos End and Home behaviour
This commit is contained in:
parent
0768dae8c6
commit
87703ecada
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This just solved a huge problem for me, so i'm putting it in a little script for future use
|
||||||
|
# https://damieng.com/blog/2015/04/24/make-home-end-keys-behave-like-windows-on-mac-os-x/
|
||||||
|
|
||||||
|
FILE="$HOME/Library/KeyBindings/DefaultKeyBinding.dict"
|
||||||
|
|
||||||
|
if [[ -r "$FILE" ]]; then
|
||||||
|
echo "There is already a keybinding file at $FILE"
|
||||||
|
else
|
||||||
|
if ! [[ -d "$(dirname $FILE)" ]]; then
|
||||||
|
mkdir -p "$(dirname $FILE)"
|
||||||
|
fi
|
||||||
|
echo "Creating keybinding file at $FILE"
|
||||||
|
echo '{
|
||||||
|
"\UF729" = moveToBeginningOfParagraph:; // home
|
||||||
|
"\UF72B" = moveToEndOfParagraph:; // end
|
||||||
|
"$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home
|
||||||
|
"$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end
|
||||||
|
"^\UF729" = moveToBeginningOfDocument:; // ctrl-home
|
||||||
|
"^\UF72B" = moveToEndOfDocument:; // ctrl-end
|
||||||
|
"^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home
|
||||||
|
"^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end
|
||||||
|
}' > $FILE
|
||||||
|
echo "You have to reboot in order for the changes to take effect"
|
||||||
|
fi
|
Loading…
Reference in New Issue