diff --git a/assets/keymaps/experiments/.gitkeep b/assets/keymaps/experiments/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/assets/keymaps/internal.json b/assets/keymaps/internal.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/assets/keymaps/internal.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/crates/settings/src/keymap_file.rs b/crates/settings/src/keymap_file.rs index c7cff92721..4dcb5a6fb0 100644 --- a/crates/settings/src/keymap_file.rs +++ b/crates/settings/src/keymap_file.rs @@ -42,8 +42,15 @@ struct ActionWithData(Box, Box); impl KeymapFileContent { pub fn load_defaults(cx: &mut MutableAppContext) { + let settings = cx.global::(); let mut paths = vec!["keymaps/default.json", "keymaps/vim.json"]; - paths.extend(cx.global::().experiments.keymap_files()); + + if settings.staff_mode { + paths.push("keymaps/internal.json") + } + + paths.extend(settings.experiments.keymap_files()); + for path in paths { Self::load(path, cx).unwrap(); }