I found a list indicating some keyboard keys to use in the KeyUp event, did not check all but the "F2" worked.
Then just change the if.
Example:
//Verificando se foi acionado a tecla F2
if(e.KeyChar == **113**){
//comandos
}
Here's the list:
8: Place ('[BACKSPACE]');
9: Place ('[TAB]');
12: Place ('[ALT]');
13: Place ('[ENTER]');
16: Place ('[SHIFT]');
17: Place ('[CONTROL]');
18: Place ('[ALT]');
20: Place ('[CAPS LOCK]');
21: Place ('[PAGE UP]');
27: Place ('[ESC]');
33: Place ('[PAGE UP]');
34: Places ('[PAGE DOWN]');
35: Place ('[END]');
36: Place ('[HOME]');
37: Place ('[LEFT ARROW]');
38: Place ('[UP ARROW]');
39: Place ('[RIGHT ARROW]');
40: Place ('[DOWN ARROW]');
45: Place ('[INSERT]');
46: Place ('[DEL]');
91: Place ('[WIN LEFT]');
92: Place ('[WIN RIGHT]');
93: Place ('[POP-UP MENU]');
96: Places ('0 & 8242;);
97: Places ('1 & 8242;);
98: Places ('2 & 8242;);
99: Places ('3 & 8242;);
100: Places ('4 & 8242;);
101: Places ('5 & 8242;);
102: Places ('6 & 8242;);
103: Places ('7 & 8242;);
104: Places ('8 & 8242;);
105: Places ('9 & 8242;);
106: Place ('[NUM *]');
107: Places ('[NUM +]');
109: Places ('[NUM -]');
110: Place ('[DECIMAL SEPTEMBER]');
111: Places ('[NUM /]');
112: Place ('[F1]');
113: Place ('[F2]');
114: Place ('[F3]');
115: Place ('[F4]');
116: Place ('[F5]');
117: Place ('[F6]');
118: Place ('[F7]');
119: Place ('[F8]');
120: Place ('[F9]');
121: Place ('[F10]');
122: Place ('[F11]');
123: Place ('[F12]');
144: Place ('[NUM LOCK]');
186: Places ('Ç');
187: Place ('=');
188: Place (',');
189: Place ('-');
190: Place ('.');
191: Place (';');
192: Place ('[APÓSTROFO]');
193: Place ('/');
194: Place ('[IN A POINT]');
219: Place ('' ');
220: Place ('' ');
221: Place ('[');
222: Place ('~');
226: Place ('\');