Firefox being the most resource-intensive program I use, I mainly run it on a separate computer and view it with VNC. With my setup, if I was okay with adding a mode or a modifier key to each of the shortcuts, I could set up shortcuts with something like xmodmap, xdotool, and/or xbindkeys. I could also make a custom keyboard layout and set it with setxkbmap.
Since I would configure the shortcuts in the window session that I use only for Firefox, it would be as if they are only for firefox. I could also configure the shortcuts in my X session outside VNC, or a special keyboard firmware, but then they would apply for all graphical programs I use.