Added internal keymaps as well, just for the hell of it

This commit is contained in:
Mikayla Maki 2022-09-08 16:37:04 -07:00
parent ec5d8f8c7c
commit 7571899f08
3 changed files with 9 additions and 1 deletions

View file

View file

@ -0,0 +1 @@
{}

View file

@ -42,8 +42,15 @@ struct ActionWithData(Box<str>, Box<RawValue>);
impl KeymapFileContent {
pub fn load_defaults(cx: &mut MutableAppContext) {
let settings = cx.global::<Settings>();
let mut paths = vec!["keymaps/default.json", "keymaps/vim.json"];
paths.extend(cx.global::<Settings>().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();
}