Skip to main content
gamedev.net
🔒 Locked

catch Ctrl + Z

Started by falledAngel Apr 26, 2006 at 1:58 AM 0 replies 400+ views
Original Post
falledAngel
falledAngel
I wanna catch the WM_KEYDOWN and WM_KEYUP with the ctrl and "Z" keys, but when I try to do this, an error happens. I've already programmed VK_DELETE key. When I have a Mesh selected and I push SUpr the mesh is deleted. But If I try to code the next to keys, there is an error. May I insert some code when VK_DELETE key is WM_KEYUP??????
I spent most of my money on booze, women and cars. The rest I just wasted. George Best
Emmanuel Deloget
Emmanuel Deloget
You WM_KEYDOWN or WM_KEYUP handler should look like
switch (key) {  case VK_DELETE: blahblahblah; break;  case VK_Z:    if (flags & VK_CONTROL) {      blahblahblah; // CTRL+Z    }    break;  case VK_...    break;  }}

Unless there is a bug in your code, this is the right way to implement a key handler.

HTH,

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.