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

ctrl+alt+<num> behaves differently from altGr+<num> #9936

Closed
kallekankaanpaa opened this issue Apr 24, 2021 · 3 comments
Closed

ctrl+alt+<num> behaves differently from altGr+<num> #9936

kallekankaanpaa opened this issue Apr 24, 2021 · 3 comments
Labels
Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@kallekankaanpaa
Copy link

Description

I can't insert special characters such as @ with ctrl+alt+2, using altGr+2 works normally.
The only combinations that work are ctrl+alt+0 and ctrl+alt+?. I found this issue concerning the latter one.

Steps to reproduce

  1. Use ISO Nordic layout
  2. Open Windows Terminal
  3. Press ctrl+alt+2

Expected behaviour

Inputs @ to terminal

Actual behaviour

Inputs nothing to terminal

Environment

Microsoft Windows [Version 10.0.19042.928]
Windows Terminal: Version: 1.7.1033.0
Keyboard Layout:  ISO Nordic
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 24, 2021
@Teiem
Copy link

Teiem commented Jul 16, 2021

Hey, I have the same problem, how did you fix it?

@dosshell
Copy link

dosshell commented Aug 9, 2021

@Teiem : To solve this you can disable the terminal shortcuts. Modify your settings.json such that the action array contains the following:

"actions":
[
    { "command": null, "keys": "ctrl+alt+1" },
    { "command": null, "keys": "ctrl+alt+2" },
    { "command": null, "keys": "ctrl+alt+3" },
    { "command": null, "keys": "ctrl+alt+4" },
    { "command": null, "keys": "ctrl+alt+5" },
    { "command": null, "keys": "ctrl+alt+6" },
    { "command": null, "keys": "ctrl+alt+7" },
    { "command": null, "keys": "ctrl+alt+8" },
    { "command": null, "keys": "ctrl+alt+9" }
]

@BWWIT
Copy link

BWWIT commented Nov 9, 2024

Nice work-around :-)

I see the same problem typing CTRL+ALT+@ | £ | $ | { | [ | ] | } (on Nordic keyboard layout).

To add this work-around to settings.json with Powershell:

$file = "$env:localappdata\Microsoft\Windows Terminal\settings.json";
copy $file $file".old"; 
$json = Get-Content -Path $file -Raw | ConvertFrom-Json
$json.actions += [PSCustomObject]@{command="closePane"; keys="ctrl+f4"}
$json.actions += [PSCustomObject]@{command=$null; keys="ctrl+alt+["}
$json.actions += [PSCustomObject]@{command=$null; keys="ctrl+alt+]"}
$json.actions += [PSCustomObject]@{command=$null; keys="ctrl+alt+{"}
$json.actions += [PSCustomObject]@{command=$null; keys="ctrl+alt+}"}
$json.actions += [PSCustomObject]@{command=$null; keys="ctrl+alt+@"}
$json.actions += [PSCustomObject]@{command=$null; keys="ctrl+alt+£"}
$json.actions += [PSCustomObject]@{command=$null; keys="ctrl+alt+$"}
$json.actions += [PSCustomObject]@{command=$null; keys="ctrl+alt+e"}
$json.profiles.list += [PSCustomObject]@{name="Powershell 7"; guid="{"+(new-guid).Guid+"}"; commandline="""C:\\Program Files\\PowerShell\\7\\pwsh.exe"" -WorkingDirectory c:\\temp"; font=[PSCustomObject]@{size = 10}}
Write-Output $json | ConvertTo-Json -Depth 10 | Out-File $file -Encoding Utf8 

(Will also add the de-facto shortcut for closing current tap: CTRL+F4 and add a profile for PS7):

Strange I only see this issue in Powershell terminals (both legacy and PS7), not in CMD terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

4 participants