I remapped a few keys for my comfort via Xmodmap.
Every time I attach a USB device or wake the laptop from sleep, the mappings are forgotten.
If I re-run the mappings manually, everything works ok.
Why is that, and how can I fix it?
I am using Ubuntu 20.04.4 LTS on a Lenovo P50, and my map is this:
clear control
clear mod1
clear mod4
clear mod5
! comments follow key assignment
keycode 133 = Alt_L Meta_L
! this makes left win into alt
keycode 64 = Control_L
! this makes left alt into control
keycode 37 = Super_L Super_L
! this makes left control into windows
! keycode 37 = Alt_L Meta_L
! this makes left control into alt
add control = Control_L Control_R
add mod1 = Alt_L Meta_L
add mod4 = Super_L Super_R
!clear control
!clear mod1
!clear mod4