Enable dead key usage in urxvt

Solution 1:

I have the English US keyboard, and I switch to the English US International keyboard with dead keys to type accents in Spanish. I have no issue typing accents in urxvt. I am using Debian 11.

To set my keyboard, I can use the commands:

setxkbmap us
setxkbmap us intl

Furthermore, I have a keybinding set to run this script to toggle between keyboard layouts:

#!/bin/bash

setxkbmap -query | grep -q "variant" &&
(setxkbmap us && notify-send -t 400 "Keyboard US") ||
(setxkbmap us intl && notify-send -t 400 "Keyboard US International")