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

Closed
opened 2026-01-31 03:47:16 +00:00 by claunia · 3 comments
Owner

Originally created by @kallekankaanpaa on GitHub (Apr 24, 2021).

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
Originally created by @kallekankaanpaa on GitHub (Apr 24, 2021). # 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](https://github.com/microsoft/terminal/issues/3079) 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 ```
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 03:47:16 +00:00
Author
Owner

@Teiem commented on GitHub (Jul 17, 2021):

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

@Teiem commented on GitHub (Jul 17, 2021): Hey, I have the same problem, how did you fix it?
Author
Owner

@dosshell commented on GitHub (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" }
]
@dosshell commented on GitHub (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" } ] ```
Author
Owner

@BWWIT commented on GitHub (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.

@BWWIT commented on GitHub (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: ```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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13607