Skip to content

Instantly share code, notes, and snippets.

@benigumocom
Last active January 29, 2021 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benigumocom/1872e4be54b8fcb2580e1a5cd0ce50f4 to your computer and use it in GitHub Desktop.
Save benigumocom/1872e4be54b8fcb2580e1a5cd0ce50f4 to your computer and use it in GitHub Desktop.
To keep on your keyboard home position for Android Studio

Goals

  • Base keymap is macOS.
  • Don't use cursor keys.
  • Use my favorite emacs keybindings for editor actions.

Use as it is (Default)

Shortcut macOS / Emacs action
⌃p Up
⌃n Down
⌃f Right
⌃b Left
⌃a Move Caret to Line Start
⌃e Move Caret to Line End
⌃k Cut up to Line End

Change actions

Shortcut macOS action Emacs action Satisfied
Indent Emacs Tab
⌃space Code Completion Basic Toggle Sticky Selection
⌃g Add Selection for Next Occurrence Escape
⌃d Debug Delete
⌃h Type Hierarchy Backspace

Add shortcuts

Action macOS shortcut Emacs shortcut Satisfied
Cut ⌘x ⌃w
Copy ⌘c ⎋x
Paste ⌘v ⌃y

Other shortcuts with cursor keys

Action macOS shortcut
Extend Selection ⌥↑
Shrink Selection ⌥↓
Goto Previous Editor Tab ⌃←
Goto Next Editor Tab ⌃→
Navigate Back ⌘⌥←
Navigate Next ⌘⌥→
Go Previous Method ⌃↑
Go Next Method ⌃↓
View Source ⌘↓

See 【Android Studio】矢印キー(カーソルキー) を使わない排除したキーマップ【macOS】

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment