Page 1 of 1
How would I change the behavior of Ctrl+Alt+Del?
Posted: Fri Sep 11, 2015 5:20 pm
by brianush1
I am developing an operating system, and I was wondering, how would I change the behavior of Ctrl+Alt+Delete to open an option screen like Windows?
I want to open an option screen when Ctrl+Alt+Delete is press, which will let you restart your PC, shut it down, and close the current program.
Re: How would I change the behavior of Ctrl+Alt+Del?
Posted: Fri Sep 11, 2015 5:38 pm
by kzinti
Pressing CTRL-ALT-DELETE when your OS is running won't do anything unless you wrote code to do something. There is no existing behaviour to change. There is nothing special about these keys unless you made them special.
Re: How would I change the behavior of Ctrl+Alt+Del?
Posted: Fri Sep 11, 2015 5:43 pm
by brianush1
kiznit wrote:Pressing CTRL-ALT-DELETE when your OS is running won't do anything unless you wrote code to do something. There is no existing behaviour to change. There is nothing special about these keys unless you made them special.
Actually, on VMWare and my own computer (tested) it restarts the computer. I want to disable that and add the list-type behavior like in Windows.
Re: How would I change the behavior of Ctrl+Alt+Del?
Posted: Fri Sep 11, 2015 5:48 pm
by kzinti
My guess is that you are still running in real mode with interrupts enabled. From
https://en.wikipedia.org/wiki/Control-Alt-Delete:
By default, when the operating system is running in real mode (or in a pre-boot environment, when no operating system is started yet), this keystroke combination is intercepted by the BIOS.[4][5][6][13]
Simply disabling interrupts (which you have to do when leaving real mode) will disable this default handling.
You can then write your own interrupt handler / driver for the keyboard and do what you need there.