[SOLVED] Inhibit CTRL/C in the console
Posted: Tue Oct 24, 2023 12:07 am
I wondered if anyone knows if it's possible to prevent CTRL/C from closing an OpenConsole() window?
Even if there isn't any keyboard input detection in the code, the window still closes as soon as the user presses CTRL/C.
There are also two keys I'd like to be able to detect if possible, because I'm trying to emulate similar functions from another application. These are :
CTRL/A (I can't detect it because Windows uses this key function to select all characters on the screen)
CTRL/F (I can't detect it because Windows invokes a Find function)
Maybe they are windows shell functions, over which PB has no control, but thought I'd ask if anyone knows some magic. In case it's relevant, I detect input using the below. For those three control functions I've mentioned, they never get detected at the Inkey() and RawKey().
Even if there isn't any keyboard input detection in the code, the window still closes as soon as the user presses CTRL/C.
There are also two keys I'd like to be able to detect if possible, because I'm trying to emulate similar functions from another application. These are :
CTRL/A (I can't detect it because Windows uses this key function to select all characters on the screen)
CTRL/F (I can't detect it because Windows invokes a Find function)
Maybe they are windows shell functions, over which PB has no control, but thought I'd ask if anyone knows some magic. In case it's relevant, I detect input using the below. For those three control functions I've mentioned, they never get detected at the Inkey() and RawKey().
Code: Select all
inpkey.s = Inkey() ; Returns ASCII input
keycode.b = RawKey() ; Returns keyboard code if input is not a conventional ASCII input