How would I change the behavior of Ctrl+Alt+Del?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
brianush1
Posts: 3
Joined: Fri Sep 11, 2015 5:14 pm

How would I change the behavior of Ctrl+Alt+Del?

Post 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.
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: How would I change the behavior of Ctrl+Alt+Del?

Post 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.
brianush1
Posts: 3
Joined: Fri Sep 11, 2015 5:14 pm

Re: How would I change the behavior of Ctrl+Alt+Del?

Post 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.
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: How would I change the behavior of Ctrl+Alt+Del?

Post 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.
Post Reply