-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
key bindings in windows (mapping Ctrl+Space) #1703
Comments
Thank you @zacps for all the effort you've put into the windows port! |
Thanks! Regarding the console output are you using a build from a7e59d39 or later? There was a change made which should fix console output. Keybindings are not something I've tested much. I don't know how 'special' actions like expanding aliases are triggered. It's possible that this might need to wait for #1661, because currently all input to Alacritty has to pass through:
And if any part of that chain doesn't understand the input it'll probably just get dropped (CONHOST being the worst offender). I'd suggest trying these things in a bare wsl prompt to see if they work first, then we can go from there. |
Not being able to map I managed to get BTW, I moved up to the latest rev from Appveyor and that resolved the console output issue! Thanks again. |
Found a few past references to using Not sure if this is Windows specific or my setup specific. Would be great if someone can test this out in their setup.. |
If you can't get it to work in bare wsl it's extremely unlikely we'll be able to solve it in alacritty (Might be worth creating an issue in Microsoft/console). You're welcome to keep investigating this but I'm probably not going to give it much attention anytime soon. |
Not sure if it's related, but Alt Gr is not working in Alacritty (eg. can't type @ on Azerty) |
I can confirm that this works as expected in cmd and powershell running wsl. i.e. I'm able to set C-Space as my tmux prefix key and it works without any issues. I assume this is what you were referring to when you say "bare wsl"? |
Seems specific to Windows alacritty given #99 seems to resolve for other platform(s).
|
Ran with --print-events to see what the key press events captured by alacritty.
|
Still not sure how to map ctrl+space in windows, but closing this issue since there doesn't seem any open action here. |
Burned by this on Windows, sad to see this closed. 😭 |
@damnskippy Did you ever happen to solve this issue? Currently having the same problem (but trying to use ctrl+space in Vim rather than in tmux). I see the Ubuntu WSL app handles Ctrl+space fine, as well as WSLtty, but sadly no luck in Ubuntu. Temporary fix for me will be to remap my Ctrl+space in Windows to something else (thankfully I don't use Ctrl+space for much) but far from ideal. |
+1. It's a bummer for Emacs users. ctrl+space is the equivalent of v in vim. |
Indeed ! So sad C-Space does not work since in emacs its such an important key combination... I wish it would work so I would not be forced to use microsoft terminal. |
Could we get this issue reopened please? ctrl+space is working fine in wsl, with windows terminal, powershell, and cmd.exe. |
Show us |
In the above I pressed ctrl+space, ctrl+c, ctrl+d Thanks for taking a look. |
#1703 (comment)
For the lazy, damnskippy's fix was this: I also see some mentions of configuring tmux like
That middle "unbind" line is new to me, and may or may not be important for your setup. Just in case there's some other mystery config I have interacting with this that I'm not aware of, all my configs are here: https://github.com/Akaito/configfiles |
Today I changed my shell on a remote server to ZSH (probably not related but that was the last thing I did) and my Control-Space binding completely stopped working. I tried to apply damnskippy's fix but to no avail. In fact, it would seem that Alacritty is not detecting anything when I press Control-Space. I can change the I have alacritty running with I cannot run I am truly at a loss as to how this started happening, but I can provide any relevant info if needed. |
Ctrl + Space is not getting passed for me. Host: Windows ssh'ing to ubuntu vm, shell is bash and the mapping shown in previous post makes no difference. |
This is broken, the fix does not work for me either. The interesting thing is the exact same setup / configurations work perfectly fine with the latest Windows Terminal so it's surely something in Alacritty itself. |
If Alacritty's output contains If it doesn't contain that for you, please let me know. |
I am getting the following when doing Control + Space:
|
Unfortunately, all above solutions doesn't work from my side. But I finnally find this is caused by a bug of openssh-windows client. microsoft/terminal#2865 (comment) I managed to build openssh-windows with this fix. Now alacritty and windows terminal can send "ctrl - space" through ssh.exe to remote server ("Ctrl+Space" prefix in tmux works as expected) prefix setting in tmux
don't forget to add below config to alacritty.yaml file at first. Otherwise above fix won't work for alacritty.
|
I have this issue under windows when ssh'ing to a linux box and using emacs. There |
Just to be clear, the advertised
|
Your comment just saved my life. |
Thank you so much! |
Another way to get a working I've been using that with the recent change to support newer |
Yes, another one here benefited by this. Thank you! |
@jimporter - appreciate your your build of alacritty ( cmentioned in #6994 ) - couldnt get the The keybind did work in good ol emacs using git-ssh but not ms's built in agent |
I just used the |
Thanks! i did not realize that |
With this advice, together with updating OpenSSH version for Windows as instructed here - https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH - I managed to finally get "CTRL+Space" to work even over SSH, together with mouse event forwarding. So it would be nice to update in the readme the following steps for getting it to work (summarizing everyone up):
[[keyboard.bindings]]
chars = "\u0000"
key = "Space"
mods = "Control" Didn't open the issue by myself, but this steps fully closes the issue. |
I have the same problem with my usage on windows 10. Normally I run git-bash, but I see the problem in nvim whether starting from powershell, cmd, wezterm, win terminal, alacritty regardless of shell. ctrl+space does work when using the nvim gui. On wezterm I could fix this with I've tried the |
@hagaigold @Amleto Did you try my solution? I reefer to:
|
I dont understand how openssh changes would help when I'm not using ssh for anything. I'm not using wsl. I did try it, though, and it made no difference |
Did you then fully do steps 1, 2 and 4? |
don't know precisely what you refer to as 'latest dev'. I am using the 0.12.3 release. Yes, I did 1,2,4 (actually I just copied the files from my wezterm install) |
0.12.3 won't work with the suggested instruction, only manual building will work for now. |
The requirement for the latest dev version is very important, since the official releases didn't merge yet the PR #6994 |
I cloned the repo and built it. I copied the binaries from wezterm into the build output dir.
This still does not make C-Space be detected |
This is the right setup, updating my original comment as well: [[keyboard.bindings]]
chars = "\u0000"
key = "Space"
mods = "Control" |
Here's my setup: [keyboard]
bindings = [
{key = "Space", mods = "Control", chars = "\u0000"},
] |
Using alacritty (downloaded from the appveyor link) on windows and have some issues/questions about key bindings.
I added a few mappings to the config file that gets me some of what I most commonly use, but however I still miss several other important ones that I don't know how to map (
Alt+.
for instance, and others).Should this work out of the box, or if not, can a canned list of such mappings be made available for those who might want to add it to their configs optionally.
One I sorely miss and don't know how to map is
Ctrl+Alt+e
which binds to expanding aliases.set -g prefix C-Space
I've tried different things (blindly) in the config file and couldn't get this to work.
Any pointers on how to achieve this mapping?
Off topic, but on windows, alacritty doesn't honor any of the command line arguments for me. I've seen other folks refer to using this even on windows, so somehow it is specific to my setup I assume. i.e. if I run
alacritty.exe -vvv
it spawns the terminal but there is no debug output, or if I doalacritty.exe --help
the command just returns without any output.Thanks!
The text was updated successfully, but these errors were encountered: