Skip to content
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

Doesn't recognise # on UK Mac keyboard (Alt-3) #1073

Closed
thisistherk opened this issue Jan 31, 2018 · 21 comments
Closed

Doesn't recognise # on UK Mac keyboard (Alt-3) #1073

thisistherk opened this issue Jan 31, 2018 · 21 comments

Comments

@thisistherk
Copy link

OSX 10.12.6. Having problems getting a hash on UK Mac keyboard (done via Alt-3 rather than Shift-3), it seems to be interpreting it as a newline? Other Alt-key combinations (e.g. the euro symbol on Alt-2) appear to work fine.

Tried adding:

- { key: 3, mods: Alt, chars: "#" }

to key_bindings in alacritty.yml, but no difference in behaviour. Works fine in Terminal and iTerm2. Anything else I can try? Thanks!

@okuuva
Copy link
Contributor

okuuva commented Feb 1, 2018

Probably related to / duplicate of #458.

@imjoshholloway
Copy link

I've got a similar issue but only from within vim
A work around I've got is to put:

- { key: Key3,     mods: Alt,     chars: "\x23"                        }

@thisistherk
Copy link
Author

Nice one, that works in vim for me too :) Still doesn't work in the shell, but I can live without that!

@nerosnm
Copy link

nerosnm commented Apr 4, 2018

I'm having this problem too. If I type Alt 3, I get a # at the beginning of the line (rather than where my cursor was) and what seems like a newline. Does anyone have a workaround that works in the shell itself, rather than just vim? This is making it impossible for me to type the # symbol in Alacritty.

@cryptoeraser
Copy link

Hey @sorenmortensen I have the same issue, please check this out. I have made a screen-capture of the issue: Alacritty "#" issue

@ghost
Copy link

ghost commented Jul 7, 2018

I'm having the same issue with UK Mac keyboard. # inserts a # and newline/return. So effectively I can't use the hash key in vim or at the command prompt. Works fine in Terminal/iTerm2.

@etiago
Copy link

etiago commented Aug 30, 2018

Mixing the solutions from @thisistherk and @imjoshholloway , I managed to get it working both in the shell and in vim:

- { key: Key3,     mods: Alt,     chars: "#"                        }

@thisistherk 's was using key 3 and @imjoshholloway 's was using the encoded hash instead of the actual character. Mixing the two does the trick for me 😄

robertknight added a commit to robertknight/mandrawer that referenced this issue Dec 5, 2018
This is the default config of alacritty v 0.2.3 with a workaround for
alacritty/alacritty#1073
@gilescope
Copy link

Many thanks! This fix makes a big difference. :shipit:

kplattret added a commit to kplattret/dotfiles that referenced this issue Aug 19, 2019
On macOS the hash character (#) is not recognised within Alacritty and
is interpreted as a new line. This aims to fix the issue.

Source: alacritty/alacritty#1073
emcfarlane added a commit to emcfarlane/dotfiles that referenced this issue Oct 2, 2020
@pwnorbitals
Copy link

Not sure what to do of this issue as a good workaround exists, but we should still consider it a bug. Is the workaround still needed on latest releases ?

@samhh
Copy link

samhh commented Oct 19, 2020

Workaround was needed for me as of last month, not checked without it since.

@MarioAriasC
Copy link

Still needed

@eggbean
Copy link

eggbean commented Sep 26, 2021

I don't know if this is the same issue, but I am using Linux on a ThinkPad T480s with UK keyboard and I cannot get the correct code for Alt-Shift-3.

In bash:
Ctrl-v, Alt-Shift-1 returns ^[!
Ctril-v, Alt-Shift-2 returns ^["
..but..
Ctrl-v, Alt-Shift-3 returns £, just as though only Shift-3 was pressed.

All the other keys on that row seem to work as expected. This does not happen on gnome-terminal and it still happens with no alactritty.yml file, so it's not anything in my settings or dotfiles.

@fakeharxy
Copy link

So this is still an issue, brand new Alacritty user here. For some reason the workaround from the .yml didn't take, I had to add it to my own config, but it works - mostly. Randomly, the # doesn't actually appear in the terminal... but it is there, it works. In vim it works fine.

@jjant
Copy link

jjant commented Jul 28, 2022

Any plans to get this fixed upstream?

@marcelloromani
Copy link

I'm having the same issue with UK Mac keyboard. # inserts a # and newline/return. So effectively I can't use the hash key in vim or at the command prompt. Works fine in Terminal/iTerm2.

Still an issue with
Version 0.10.1 (1)

@marcelloromani
Copy link

Mixing the solutions from @thisistherk and @imjoshholloway , I managed to get it working both in the shell and in vim:

- { key: Key3,     mods: Alt,     chars: "#"                        }

@thisistherk 's was using key 3 and @imjoshholloway 's was using the encoded hash instead of the actual character. Mixing the two does the trick for me 😄

https://github.com/alacritty/alacritty/blob/master/alacritty.yml#L558

Where does that line go? I find it pretty difficult to determine the place in the yaml hierarchy where that key binding list element should be placed by skimming the yaml file in the repo.

@marcelloromani
Copy link

OK, in proper #rubberduck fashion, after writing the above comment I came up with the content of ~/.alacritty.yml that fixed the issue for me:

$ cat ~/.alacritty.yml
key_bindings:
   - { key: Key3, mods: Alt, chars: "#" }

@marcelloromani
Copy link

It doesn't really help that you start reading about Key bindings on line 558 but the actual config value doesn't show up until line 761 https://github.com/alacritty/alacritty/blob/master/alacritty.yml#L761

@Integralist
Copy link

Integralist commented Dec 16, 2022

I've had this fixed in the past with...

  - { key: Key3,     mods: Alt,     chars: "#"                        }

But since updating to the latest Alacritty (0.11.0) and it has suddenly stopped working?

Someone here suggested the following but that doesn't work for me...

  - { key: Key3,     mods: Alt,     chars: "\x23"                        }

This is a problem in vim it seems only. Even though I'm in INSERT mode, the moment I press Alt+3 it will switch me to NORMAL mode and then jump into searching for whatever word is under my cursor (or E348: No string under cursor if typing into an empty buffer). BUT if I use Alt+<some other number> and then Alt+3 it will insert a hash???

@Serginho
Copy link

Same problem than @Integralist , keys alt+1, alt+2 and alt+3 don't works, but alt+4 from here on out works property.

I'm using Magic keyboard (Spanish lang)

@kchibisov
Copy link
Member

I'm pretty sure with the help of OptionAsAlt on macOS you'll be able to type everything and with #6958 it'll allow more granular settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests