Seria algo assim:
function clientKey (button, press)
if button == 'F1' or button == 'F2' then
cancelEvent ()
end
end
addEventHandler("onClientKey", root, clientKey)
Esse código faz com que cancele a ação de apertar no botão. Se você colocar o and state == "down" só vai cancelar o evento quando apertar o botão, mas quando soltar (state == "up") ainda vai ativar.