How to send Ctrl+Alt+F1 (and other special keystrokes) to X window?
Solution 1:
Let's call Ctrl+Alt+Fx (where Fx is one of function buttons: F1, F2, F3...) srvr keys.
There is a way to disable/enable srvr keys on the fly. By disabling I mean that X11 do not swallow them, but passes to window manager (kwin in kde).
For diabling srvr keys, you run setxkbmap -option srvrkeys:none
For enabling srvr keys, you run setxkbmap -option
To check if srvr_ctrl(no_srvr_keys) flag is enabled, run setxkbmap -print | grep xkb_symbols
In kde there is possibility to perform window actions (for example, execute some command when window gets or looses focus). So you can automatically disable srvr keys when your special application window is focused, and automatically enable them back when it looses focus. It is universal solution. Useful for such applications as TeamViewer, VirtualBox, Chrome Remote Desktop, ipkvm viewer, krdc and so on.
If you interested, here is my script that I use for this thing: https://github.com/Ashark/aten-ip8000/blob/master/srvrkeys
Solution 2:
For VirtualBox, try the key combination REL + F1. Here, REL is the key used to release the mouse grab in the VirtualBox window, usually right Ctrl or Alt key.