When I open a shell in ranger with shift-s, open vim and then open a shell with :sh or open a new shell tab with ctrl-shift-t, my xmodmap keybindings (swapped caps lock and escape keys) are reset. This is what the terminal spits out:
xmodmap: please release the following keys within 2 seconds: t (keysym 0x74, keycode 28) Shift_R (keysym 0xffe2, keycode 62)
My keybindings are very important to me as I am an active vim user currently working with Typescript (I need quick access to the shell to compile my code). I set my keybindings with
xmodmap ~/.Xmodmap (the .Xmodmap file contains my xmodmap commands) and I added that command to my .bashrc.
For some more context I am using Ubuntu 16.4 and I recently created a ranger configuration file (~/.config/ranger/rifle.conf) to add support for the .ts file extension. I not an expert ranger or bash user, but both are very important for my workflow. Help would be greatly appreciated.
edit: this problem is solved when I remove
xmodmap ~/.Xmodmap from my .bashrc, but now I have no way of having my xmodmap keybindings enabled on startup. Adding
@reboot xmodmap ~/.Xmodmap to my crontab file does not work (maybe I should post a separate question for that, but I'll leave this question here for future reference).