This is the latest code I'm trying without any succes.
"Without any succes(s)" is just about as lame as "it doesn't work". The code you posted does something. You haven't said what it does.
You expect it to do something. You haven't said what.
Sending F11 to the PC is NOT the same as some application on the PC understanding F11 and doing something when the F11 is pressed. Is the application that is supposed to deal with the F11 key actually active?