// f: voidfunc(NativeKeyEvent) static void onGlobalKeyPress(fO f) { jnativehook_init(); GlobalScreen.addNativeKeyListener(new NativeKeyAdapter { public void nativeKeyPressed(NativeKeyEvent e) { pcallF(f, e); } }); }