First pass at making a linux keymap (#8082)

Undoubtedly not perfect, but this should be something we can work off
of.

Note that matching keybindings with ctrl in them is currently broken on
linux (or at least x11). This keymap might just manage to be less useful
than using the macos one on linux until that is fixed... the proximate
cause of this is that the `key` field of the `Keystroke` struct looks
like `"\u{e}"` instead of `"n"` when `ctrl-n` is pressed.

Release Notes:

- N/A
This commit is contained in:
gmorenz 2024-02-20 16:51:54 -05:00 committed by GitHub
parent 389d26d974
commit 8f5d7db875
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 570 additions and 4 deletions

View file

@ -26,6 +26,7 @@ use runnable::static_source::StaticSource;
use search::project_search::ProjectSearchBar;
use settings::{
initial_local_settings_content, watch_config_file, KeymapFile, Settings, SettingsStore,
DEFAULT_KEYMAP_PATH,
};
use std::{borrow::Cow, ops::Deref, path::Path, sync::Arc};
use terminal_view::terminal_panel::{self, TerminalPanel};
@ -570,7 +571,7 @@ fn reload_keymaps(cx: &mut AppContext, keymap_content: &KeymapFile) {
}
pub fn load_default_keymap(cx: &mut AppContext) {
KeymapFile::load_asset("keymaps/default.json", cx).unwrap();
KeymapFile::load_asset(DEFAULT_KEYMAP_PATH, cx).unwrap();
if VimModeSetting::get_global(cx).0 {
KeymapFile::load_asset("keymaps/vim.json", cx).unwrap();
}