For my Spanish 2 class, we are required to be able to type accent characters. It took some time to figure out how to do this in Hyprland, so I thought I’d share my solution here.
Solution
In general, there are two ways to type accent characters:
- AltGr: holding down the AltGr key and typing the character you want to accent. For example, holding down the AltGr key and typing
a
will give you á. - Dead keys: typing apostrophe (
'
) then the character you want to accent. For example, typing'a
will give you á.
Personally, I find the AltGr method to be more intuitive and less intrusive. I will still share both methods.
AltGr
In your Hyprland config, add the following:
input {
kb_layout = us
kb_options = lv3:ralt_switch
kb_variant = altgr-intl
}
Explanation:
kb_layout = us
: sets the keyboard layout to US.kb_options = lv3:ralt_switch
: sets the right Alt key as the AltGr key.kb_variant = altgr-intl
: allows you to use the AltGr key to type accent characters.
Dead keys
In your Hyprland config, add the following:
input {
kb_layout = us
kb_variant = intl
}
Here, intl
adds dead keys, allowing you to type accent characters by typing '
then the character you want to accent.