diff options
author | Joe Wilm <joe@jwilm.com> | 2017-01-02 23:47:56 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2017-01-02 23:47:56 -0800 |
commit | 79d13c736e5d5b0c85f1387399ab40195ed2d4a8 (patch) | |
tree | fd8fa8a8c3da469d34ff5ad9b3a6b06f9217f95c /src/input.rs | |
parent | 38a9673eb3b09fcfaa1dd3e97f360b69875d2982 (diff) | |
download | alacritty-79d13c736e5d5b0c85f1387399ab40195ed2d4a8.tar.gz alacritty-79d13c736e5d5b0c85f1387399ab40195ed2d4a8.zip |
Send correct character sequence with alt key
Resolves #46.
Diffstat (limited to 'src/input.rs')
-rw-r--r-- | src/input.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/input.rs b/src/input.rs index 3b23c0c7..f2bd461b 100644 --- a/src/input.rs +++ b/src/input.rs @@ -365,7 +365,12 @@ impl<'a, N: Notify + 'a> Processor<'a, N> { } // Didn't process a binding; print the provided character - if let Some(string) = string { + if let Some(mut string) = string { + // from ST + if string.len() == 1 && mods.contains(mods::ALT) { + string.insert(0, '\x1b'); + } + self.ctx.notifier.notify(string.into_bytes()); self.ctx.selection.clear(); } |