Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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