Skip to content

Commit 591882c

Browse files
committed
Clean up and add new keybindings from latest keymap
Long term cleanup tasks: - Upgrade from Gradle 5.2.1 to 6.6.1 - Start refactor of build script - Remove gradle.properties from gitignore and add props - Add real changelog - Add FAQs and more detailed keybinding information
1 parent ccccc04 commit 591882c

File tree

11 files changed

+232
-109
lines changed

11 files changed

+232
-109
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
build
22
.idea
33
.gradle
4-
gradle.properties

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## [Unreleased]
2+
### Added
3+
4+
### Changed
5+
6+
### Deprecated
7+
8+
### Removed
9+
10+
### Fixed
11+
12+
### Security
13+
## [2.0.0]
14+
### Added
15+
- Updated to match latest keymap as of [367cd5f](https://github.com/JetBrains/intellij-community/blob/fb0eb45e7d27dffbb490030c623bcf65eb402aeb/platform/platform-resources/src/keymaps/Mac%20OS%20X%2010.5%2B.xml).
16+
- Support new commit tool window (`Alt-0` when commit is active)
17+
### Removed
18+
- `ActivateTODOToolWindow` removed from keymap as of [b6eda](https://github.com/JetBrains/intellij-community/commit/24fe6c91cc91d51a2042737e9b7d01dd94305943#diff-8d8929a05e92b93072513b4727735c81) to make room for the Problems view.
19+
### Fixed
20+
- Keymap range set to 2020.2.* and beyond (no `untilBuild`)
21+
- `NextSplitter` and `PrevSplitter` updated to prevent conflicts with Alt-Tab

README.md

Lines changed: 77 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
11
# JetBrains macOS Keymap for Windows and Linux
22

3+
![JetBrains IntelliJ Plugins](https://img.shields.io/jetbrains/plugin/v/13968-macos-for-all?style=for-the-badge)
4+
35
[Cheatsheet](Keymap-macOS%20For%20All.pdf)
46

57
This repo converts the lovely Mac OS X 10.5+ keymap in JetBrains
68
IDEs from macOS-specific bindings to ones without `meta` (i.e., the Command/splat/cloverleaf interchange from hell).
79

8-
While some keybindings are close to their original, others have more modifier keys or different bindings altogether to avoid clashing.
10+
While some keybindings are close to their original, others have more modifier keys or different bindings altogether to avoid conflicts.
911

1012
## Build
11-
Follow JetBrain's [guide](https://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system/prerequisites.html) for using Gradle for plugins development.
13+
Follow JetBrain's [guide](https://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system/prerequisites.html) for using Gradle for plugin development.
1214

1315
## Installation
1416

1517
Install the plugin from the [plugin marketplace](https://plugins.jetbrains.com/plugin/13968-macos-for-all) or
1618
grab the zip file from the [latest release](https://github.com/samvtran/jetbrains-macos-keybindings-for-all/releases/latest) and install manually.
1719

20+
## Release
21+
For release tasks, the INTELLIJ_PUBLISH_TOKEN environment variable should be available.
22+
1823
## Issues
1924
If you notice any issues, please report them [here](https://github.com/samvtran/jetbrains-macos-keybindings-for-all/issues/new)!
2025

2126
## Key Updates
2227

2328
| Actions | Mac OS X 10.5+ Keybindings | New Keybindings |
2429
| --: | -- | -- |
25-
| ActivateMessageToolWindow | `Command-0` | `Alt-0` |
2630
| ActivateProjectToolWindow | `Command-1` | `Alt-1` |
2731
| ActivateFavoritesToolWindow | `Command-2` | `Alt-2` |
2832
| ActivateFindToolWindow | `Command-3` | `Alt-3` |
2933
| ActivateRunToolWindow | `Command-4` | `Alt-4` |
3034
| ActivateDebugToolWindow | `Command-5` | `Alt-5` |
31-
| ActivateTODOToolWindow | `Command-6` | `Alt-6` |
35+
| ActivateProblemsViewToolWindow | `Command-6` | `Alt-6` |
3236
| ActivateStructureToolWindow | `Command-7` | `Alt-7` |
33-
| ActivateHierarchyToolWindow | `Command-8` | `Alt-8` |
37+
| ActivateServicesToolWindow | `Command-8` | `Alt-8` |
3438
| ActivateVersionControlToolWindow | `Command-9` | `Alt-9` |
39+
| ActivateCommitToolWindow | `Command-0` | `Alt-0` |
3540
| Back | `Command-[` <br> `Command-Alt-Left` | `Control-[` |
3641
| ChangesView.Move | `Command-Shift-M` | `Control-Shift-M` |
3742
| ChooseDebugConfiguration | `Control-Alt-D` | `Control-Alt-Shift-D` |
3843
| ChooseRunConfiguration | `Control-Alt-R` | `Control-Alt-Shift-R` |
3944
| CloseContent | `Command-W` | `Control-W` |
45+
| ContextHelp | `Command-Shift-F1` | `Control-Shift-F1` |
4046
| Debug | `Control-D` | `Control-Alt-D` |
4147
| Diff.NextChange | `Command-Shift-]`<br>`Control-Right` | `Control-Shift-]` |
4248
| Diff.PrevChange | `Command-Shift-[`<br>`Control-Left` | `Control-Shift-[` |
@@ -73,37 +79,37 @@ If you notice any issues, please report them [here](https://github.com/samvtran/
7379
| GotoClass | `Command-O` | `Control-O` |
7480
| GotoFile | `Command-Shift-O` | `Control-Shift-O` |
7581
| GotoLine | `Command-L` | `Control-L` |
76-
| GotoNextElementUnderCaretUsage | `Control-Alt-Down` | `Alt-Shift-Down` |
77-
| GotoPrevElementUnderCaretUsage | `Control-Alt-Up` | `Alt-Shift-Up` |
78-
| GotoRelated | `Control-Meta-Up` | `Control-Shift-Up` |
82+
| GotoRelated | `Control-Meta-Up` | `Control-Alt-Home` |
7983
| GotoSymbol | `Command-Alt-O` | `Control-Alt-O` |
80-
| GoToTypeDeclaration | `Command-Shift-B` <br> `Control-Shift-B` <br> `Command-Shift-button1` | `Control-Shift-B` <br> `Control-Shift-button` |
84+
| GotoTypeDeclaration | `Command-Shift-B` <br> `Control-Shift-B` <br> `Command-Shift-button1` | `Control-Shift-B` <br> `Control-Shift-button` |
8185
| MethodDown | `Control-Down` | `Control-Alt-Down` |
8286
| MethodUp | `Control-Up` | `Control-Alt-Up` |
8387
| MinimizeCurrentWindow | `Command-M` | `Control-M` |
8488
| NewElement | `Command-N` | `Control-N` |
8589
| NewScratchFile | `Command-Shift-N` | `Control-Shift-N` |
8690
| NextEditorTab | `Control-Shift-Right` | `Control-Alt-Shift-Right` |
8791
| NextProjectWindow | ``Command-Alt-` `` | ``Control-Alt-` `` |
88-
| NextTag | `Command-Shift-]`<br>`Control-Right` | `Control-Shift-]` |
92+
| NextSplitter | `Alt-Tab` | `Control-Alt-Left` |
93+
| NextTab | `Command-Shift-]`<br>`Control-Right` | `Control-Shift-]` |
8994
| OptimizeImports | `Control-Alt-O` | `Control-Alt-Shift-O` |
9095
| OverrideMethods | `Control-O` | `Alt-Shift-O` |
9196
| PreviousEditorTab | `Control-Shift-Left` | `Control-Alt-Shift-Left` |
9297
| PreviousProjectWindow | ``Command-Alt-Shift-` `` | ``Control-Alt-Shift-` `` |
98+
| PreviousSplitter | `Alt-Shift-Tab` | `Control-Alt-Right` |
9399
| PreviousTab | `Command-Shift-[`<br>`Control-Left` | `Control-Shift-[` |
94100
| QuickImplementations | `Command-Y` | `Control-Y` |
95-
| Refresh | `Command-R` | `Control-R` |
101+
| Refresh | `Command-R` | `Control-R` <br> `Control-F5` |
96102
| ReplaceInPath | `Command-Shift-R` | `Control-Shift-R` |
97103
| Rerun | `Command-R` | `Control-R` |
98104
| Run | `Control-R` | `Control-Alt-R` |
99105
| RunClass | `Control-Shift-R` | `Control-Shift-C` |
100-
| RunDashboard.ShowConfigurations | `Command-Shift-T` | `Control-Shift-T` |
106+
| ServiceView.ShowServices | `Command-Shift-T` | `Control-Shift-T` |
101107
| SafeDelete | `Command-Delete` | `Control-Delete` |
102108
| SearchEverywhere.NavigateToNextGroup | `Command-Down` | `Control-Down` |
103109
| SearchEverywhere.NavigateToPrevGroup | `Command-Up` | `Control-Up` |
104110
| SelectAllOccurrences | `Command-Control-G` | `Control-Alt-Shift-G` |
105111
| ShowBookmarks | `Command-F3` | `Control-F3` |
106-
| ShowContent | `Control-Down` | `Control-Shift-Down` |
112+
| ShowContent | None | `Control-Shift-Down` |
107113
| ShowNavBar | `Command-Up` | `Control-Up` |
108114
| ShowProjectStructureSettings | `Command-;` | `Control-;` |
109115
| ShowSettings | `Command-,` | `Control-,` |
@@ -120,20 +126,72 @@ If you notice any issues, please report them [here](https://github.com/samvtran/
120126
## Removed Keybindings
121127

122128
| Actions | Mac OS X 10.5+ Keybindings | Alternatives |
123-
| -- | -- | -- |
124-
| $Delete | `Command-Backspace` | Just backspace... |
125-
| ActivateVersionControlToolWindow | `Command-Shift-9` | `Control-Alt-9` |
129+
| --: | -- | -- |
130+
| $Delete | `Command-Backspace` | Just backspace |
131+
| Back | `Command-Alt-Left` | `Control-[` |
126132
| CommentByBlockComment | `Command-Alt-/` <br> `Command-Shift-/` | `Control-Shift-/` |
127133
| EditorDown | `Control-N` | `Down` |
128134
| EditorLeft | `Control-B` | `Left` |
129-
| EditorLineEnd | `Control E` | `Control-Right` <br> `End` |
135+
| EditorLineEnd | `Control-E` | `Control-Right` <br> `End` |
130136
| EditorLineStart | `Control-A` | `Control-Left` <br> `Home` |
137+
| EditorPreviousWord | `Control-Alt-B` | `Alt-Left` |
138+
| EditorPreviousWordWithSelection | `Control-Alt-Shift-B` | `Alt-Shift-Left` |
139+
| EditorNextWord | `Control-Alt-F` | `Alt-Right` |
140+
| EditorNextWordWithSelection | `Control-Alt-Shift-F` | `Alt-Shift-Right` |
131141
| EditorRight | `Control-F` | `Right` |
132142
| EditorToggleColumnMode | `Command-Shift-NumPad[*]` | `Control-Alt-Shift-8` |
133143
| EditorUp | `Control-P` | `Up` |
134144
| FindNext | `Control-L` | `F3` |
135145
| FindPrevious | `Control-Shift-L` | `Shift-F3` |
136-
| RerunTests | `Command-Control-R` | `Shift-Alt-R` |
146+
| Forward | `Command-Alt-Right` | `Control-]`
147+
| RerunTests | `Command-Control-R` | `Alt-Shift-R` |
137148
| Resume | `Command-Alt-R` | `F9` |
138-
| Vcs.ShowMessageHistory | `Control-M` | `Control-E` |
149+
| Vcs.ShowMessageHistory | `Control-M` | `Control-E` |
150+
151+
## Default Implicit Keybindings
152+
These keybindings are set by the [`$default`](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-resources/src/keymaps/%24default.xml) keymap
153+
and are, therefore, not included even though the Mac OS X 10.5+ keymap may define them explicitly.
154+
155+
| Actions | Mac OS X 10.5+ Keybindings | $default Keybindings |
156+
| --: | -- | -- |
157+
| ChangesView.GroupBy.Directory | `Control-P` | `Control-Alt-P` |
158+
| ChangesView.GroupBy.Module | `Control-M` | `Control-Alt-M` |
159+
| Diff.ApplyLeftSide | `Control-Shift-Right` | `Alt-Shift-Right` |
160+
| Diff.ApplyRightSide | `Control-Shift-Left` | `Alt-Shift-Left` |
161+
| ForceRefresh | `Command-Alt-Shift-R` | `Control-Shift-F5` |
162+
| GoToDeclaration | `Command-B` <br> `Command-click` <br> `Middle click` <br> Force touch | `Control-B` <br> `Control-click` |
163+
| RunToCursor | `Alt-F9` <br> Force touch | `Alt-F9` |
164+
| ServiceView.GroupByContributor | `Control-T` | `Control-Alt-T` |
165+
| ServiceView.GroupByServiceGroups | `Control-P` | `Control-Alt-P` |
166+
| TodoViewGroupByShowModules | `Control-M` | `Control-Alt-M` |
167+
| TodoViewGroupByShowPackages | `Control-P` | `Control-Alt-P` |
168+
| TodoViewGroupByFlattenPackage | `Control-F` | `Control-Alt-C` |
169+
| ToggleAmendCommitMode | `Control-Alt-M` | `Alt-M` |
170+
| ToggleFindInSelection | `Control-Alt-E` | `Control-Alt-E` |
171+
| UsageGrouping.Module | `Control-M` | `Control-Alt-M` |
172+
| UsageGrouping.Directory | `Control-P` | `Control-Alt-P` |
173+
| UsageGrouping.UsageType | `Control-T` | `Control-Alt-T` |
174+
| UsageGrouping.FlattenModules | `Control-O` | `Control-Alt-O` |
175+
| UsageGrouping.FileStructure | `Control-F` | `Control-Alt-F` |
176+
| UsageGrouping.DirectoryStructure | `Control-D` | `Control-Alt-D` |
177+
178+
## Missing/no-op Keybindings
179+
This list may change over time.
180+
181+
| Actions | Keybindings | Reason |
182+
| --: | -- | -- |
183+
| PrevWindow/NextWindow | ``Command+Shift+` ``/``Command+` `` | Workaround for [platform-specific issues](https://youtrack.jetbrains.com/issue/IDEA-217613). For Linux, use ``Alt-` `` for supported WMs. For Windows, try something like [this AutoHotKey script](https://gist.github.com/samvtran/3b11cdb829ea5da9f166591752123816) for similar behavior. |
184+
| EmojiAndSymbols | `Command-Control-Space` | This is rebound to `Control-Alt-Shift-Space` but [does not function outside macOS](https://github.com/JetBrains/intellij-community/blob/b69a466631b01c408897e1b9f4159f6632470a0b/platform/platform-impl/src/com/intellij/ide/actions/MacEmojiAndSymbolsInputAction.java). For Windows, use `Super+;` or `Super+.` to activate the built-in emoji picker. |
185+
186+
187+
## FAQ
188+
### Oh no! My favorite keybinding changed after an update! What do I do?
189+
This project tries to follow the Mac OS X 10.5+ keybindings as closely as possible.
190+
As new UI elements and IDE features are added, JetBrains may add and remove keybindings to
191+
better match their evolving feature set. If you find that your muscle memory is getting in the way
192+
of a new binding, make a copy of this keymap for your own custom shortcuts.
139193

194+
### I just switched from macOS to Linux/Windows. What can I do to make the transition easier?
195+
Use a plugin like [Presentation Assistant](https://plugins.jetbrains.com/plugin/7345-presentation-assistant)
196+
or [Key Promoter X](https://plugins.jetbrains.com/plugin/9792-key-promoter-x) to help you learn new
197+
shortcuts.

build.gradle.kts

Lines changed: 57 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,57 @@
1-
2-
import org.jetbrains.intellij.tasks.PublishTask
3-
4-
plugins {
5-
id("org.jetbrains.intellij") version "0.4.16"
6-
}
7-
8-
group = "com.samvtran"
9-
version = "1.0.2"
10-
11-
repositories {
12-
mavenCentral()
13-
}
14-
15-
dependencies {
16-
testCompile("junit", "junit", "4.12")
17-
}
18-
19-
// See https://github.com/JetBrains/gradle-intellij-plugin/
20-
intellij {
21-
version = "2019.3.3"
22-
}
23-
configure<JavaPluginConvention> {
24-
sourceCompatibility = JavaVersion.VERSION_1_8
25-
}
26-
tasks.getByName<org.jetbrains.intellij.tasks.PatchPluginXmlTask>("patchPluginXml") {
27-
changeNotes("""
28-
<ul>
29-
<li>Increasing supported IDE range from 2019.* to 2017 to 2020+</li>
30-
</ul>""")
31-
sinceBuild("173.*")
32-
untilBuild("202.*")
33-
}
34-
tasks.withType<PublishTask> {
35-
token(findProperty("intellijPublishToken"))
36-
}
1+
import org.jetbrains.changelog.closure
2+
import org.jetbrains.changelog.markdownToHTML
3+
4+
plugins {
5+
id("org.jetbrains.intellij") version "0.4.26"
6+
id("org.jetbrains.changelog") version "0.5.0"
7+
}
8+
9+
val pluginGroup: String by project
10+
val pluginName_: String by project
11+
val pluginVersion: String by project
12+
13+
val platformVersion: String by project
14+
15+
group = pluginGroup
16+
version = pluginVersion
17+
18+
buildscript {
19+
repositories {
20+
// Workaround: https://github.com/JetBrains/gradle-intellij-plugin/issues/537
21+
maven("https://jetbrains.bintray.com/intellij-plugin-service")
22+
}
23+
}
24+
25+
repositories {
26+
mavenCentral()
27+
jcenter()
28+
}
29+
30+
// See https://github.com/JetBrains/gradle-intellij-plugin/
31+
intellij {
32+
pluginName = pluginName_
33+
version = platformVersion
34+
updateSinceUntilBuild = false
35+
}
36+
37+
tasks {
38+
// Set the compatibility versions to 1.8
39+
withType<JavaCompile> {
40+
sourceCompatibility = "1.8"
41+
targetCompatibility = "1.8"
42+
}
43+
44+
patchPluginXml {
45+
changeNotes(
46+
closure {
47+
changelog.getLatest().toHTML()
48+
}
49+
)
50+
}
51+
52+
publishPlugin {
53+
dependsOn("patchChangelog")
54+
token(System.getenv("INTELLIJ_PUBLISH_TOKEN"))
55+
channels(pluginVersion.split('-').getOrElse(1) { "default" }.split('.').first())
56+
}
57+
}

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pluginGroup = com.samvtran
2+
pluginName_ = macosforallkeymap
3+
pluginVersion = 2.0.0
4+
platformVersion = LATEST-EAP-SNAPSHOT

gradle/wrapper/gradle-wrapper.jar

3.92 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)