summaryrefslogtreecommitdiff
path: root/src/config/bindings.rs
diff options
context:
space:
mode:
authoracheronfail <acheronfail@gmail.com>2019-04-24 05:05:47 +1000
committerChristian Duerr <chrisduerr@users.noreply.github.com>2019-04-23 19:05:47 +0000
commite9813031f6e308984cb5547aa1049839cb75745f (patch)
treec8e6286c98f4f42b6e170e477baa6b1f949b83ef /src/config/bindings.rs
parentb0efa9d105b53211d8df094238c7eb8324e93566 (diff)
downloadalacritty-e9813031f6e308984cb5547aa1049839cb75745f.tar.gz
alacritty-e9813031f6e308984cb5547aa1049839cb75745f.zip
Add fullscreen support
Fixes #34. Fixes #2012.
Diffstat (limited to 'src/config/bindings.rs')
-rw-r--r--src/config/bindings.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/config/bindings.rs b/src/config/bindings.rs
index 0e00f6fe..7e69182b 100644
--- a/src/config/bindings.rs
+++ b/src/config/bindings.rs
@@ -178,7 +178,7 @@ pub fn default_key_bindings() -> Vec<KeyBinding> {
}
#[cfg(not(any(target_os = "macos", test)))]
-pub fn platform_key_bindings() -> Vec<KeyBinding> {
+fn common_keybindings() -> Vec<KeyBinding> {
bindings!(
KeyBinding;
Key::V, [ctrl: true, shift: true]; Action::Paste;
@@ -192,6 +192,21 @@ pub fn platform_key_bindings() -> Vec<KeyBinding> {
)
}
+#[cfg(not(any(target_os = "macos", target_os = "windows", test)))]
+pub fn platform_key_bindings() -> Vec<KeyBinding> {
+ common_keybindings()
+}
+
+#[cfg(all(target_os = "windows", not(test)))]
+pub fn platform_key_bindings() -> Vec<KeyBinding> {
+ let mut bindings = bindings!(
+ KeyBinding;
+ Key::Return, [alt: true]; Action::ToggleFullscreen;
+ );
+ bindings.extend(common_keybindings());
+ bindings
+}
+
#[cfg(all(target_os = "macos", not(test)))]
pub fn platform_key_bindings() -> Vec<KeyBinding> {
bindings!(
@@ -200,6 +215,7 @@ pub fn platform_key_bindings() -> Vec<KeyBinding> {
Key::Equals, [logo: true]; Action::IncreaseFontSize;
Key::Add, [logo: true]; Action::IncreaseFontSize;
Key::Minus, [logo: true]; Action::DecreaseFontSize;
+ Key::F, [ctrl: true, logo: true]; Action::ToggleFullscreen;
Key::K, [logo: true]; Action::ClearHistory;
Key::K, [logo: true]; Action::Esc("\x0c".into());
Key::V, [logo: true]; Action::Paste;