ArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2009-08-26T16:54:01+02:00 https://brainmodular.com/forums/app.php/feed/topic/1701 2009-08-26T16:54:01+02:00 2009-08-26T16:54:01+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10033#p10033 <![CDATA[Get control-alt-shift state]]>
for that you have to query directly the keyboard state like:

CODE:

  BYTE state&#91;256&#93;;    #define KEY_PRESSED&#40;key&#41; &#40;state&#91;key&#93; & 0x80&#41;    GetKeyboardState&#40;state&#41;;    if &#40;KEY_PRESSED&#40;VK_CONTROL&#41; && KEY_PRESSED&#40;'C'&#41;&#41; &#123;        // CTRL-C pressed    &#125;
useful infos, have to put this on the wiki


thanks senso

Statistics: Posted by martignasse — 26 Aug 2009, 16:54


]]>
2009-08-26T16:40:18+02:00 2009-08-26T16:40:18+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10031#p10031 <![CDATA[Get control-alt-shift state]]> Statistics: Posted by Gizzeta — 26 Aug 2009, 16:40


]]>
2009-08-26T10:19:09+02:00 2009-08-26T10:19:09+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10029#p10029 <![CDATA[Get control-alt-shift state]]>

CODE:

  BYTE state&#91;256&#93;;    #define KEY_PRESSED&#40;key&#41; &#40;state&#91;key&#93; & 0x80&#41;    GetKeyboardState&#40;state&#41;;    if &#40;KEY_PRESSED&#40;VK_CONTROL&#41; && KEY_PRESSED&#40;'C'&#41;&#41; &#123;        // CTRL-C pressed    &#125;

Statistics: Posted by senso — 26 Aug 2009, 10:19


]]>
2009-08-25T23:03:36+02:00 2009-08-25T23:03:36+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10028#p10028 <![CDATA[Get control-alt-shift state]]> I would like to get the shift state even if I don't move the mouse...

Statistics: Posted by Gizzeta — 25 Aug 2009, 23:03


]]>
2009-08-25T22:47:34+02:00 2009-08-25T22:47:34+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10024#p10024 <![CDATA[Get control-alt-shift state]]>
But there is an error in the Userdefinitions.h file

CODE:

//----------------------------------------------------------------------------// keys state modifiers// used in MouseMove, MouseUp and MouseDown functions declaration &#40;see end of file&#41; typedef enum TShiftState &#123;   ssShift,   ssAlt,   ssCtrl,   ssLeft,   ssRight,   ssMiddle,   ssDouble   &#125;;
must be replaced by

CODE:

//----------------------------------------------------------------------------// keys state modifiers// used in MouseMove, MouseUp and MouseDown functions declaration &#40;see end of file&#41;typedef DWORD TShiftState ;static DWORD const ssShift = 0x1static DWORD const ssAlt = 0x2static DWORD const ssCtrl = 0x4static DWORD const ssLeft = 0x8static DWORD const ssRight = 0x10static DWORD const ssMiddle = 0x20static DWORD const ssDouble = 0x40
so you can check if 'Shift' contains one or several values above.

CODE:

if &#40;&#40;Shift & ssCtrl&#41; !=0&#41; &#123;..&#125; //means that the Ctrl key is pressed
This error will be 'officially' corrected in the next SDK release.

Statistics: Posted by senso — 25 Aug 2009, 22:47


]]>
2009-08-25T17:50:18+02:00 2009-08-25T17:50:18+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10021#p10021 <![CDATA[Get control-alt-shift state]]>
Is there a way to always get the control, alt and shift state in a module, not only when the mouse is on the module panel?

thanks

Statistics: Posted by Gizzeta — 25 Aug 2009, 17:50


]]>
BrainModular BrainModular Users Forum 2009-08-26T16:54:01+02:00 https://brainmodular.com/forums/app.php/feed/topic/1701 2009-08-26T16:54:01+02:00 2009-08-26T16:54:01+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10033#p10033 <![CDATA[Get control-alt-shift state]]>
for that you have to query directly the keyboard state like:

CODE:

  BYTE state&#91;256&#93;;    #define KEY_PRESSED&#40;key&#41; &#40;state&#91;key&#93; & 0x80&#41;    GetKeyboardState&#40;state&#41;;    if &#40;KEY_PRESSED&#40;VK_CONTROL&#41; && KEY_PRESSED&#40;'C'&#41;&#41; &#123;        // CTRL-C pressed    &#125;
useful infos, have to put this on the wiki


thanks senso

Statistics: Posted by martignasse — 26 Aug 2009, 16:54


]]>
2009-08-26T16:40:18+02:00 2009-08-26T16:40:18+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10031#p10031 <![CDATA[Get control-alt-shift state]]> Statistics: Posted by Gizzeta — 26 Aug 2009, 16:40


]]>
2009-08-26T10:19:09+02:00 2009-08-26T10:19:09+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10029#p10029 <![CDATA[Get control-alt-shift state]]>

CODE:

  BYTE state&#91;256&#93;;    #define KEY_PRESSED&#40;key&#41; &#40;state&#91;key&#93; & 0x80&#41;    GetKeyboardState&#40;state&#41;;    if &#40;KEY_PRESSED&#40;VK_CONTROL&#41; && KEY_PRESSED&#40;'C'&#41;&#41; &#123;        // CTRL-C pressed    &#125;

Statistics: Posted by senso — 26 Aug 2009, 10:19


]]>
2009-08-25T23:03:36+02:00 2009-08-25T23:03:36+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10028#p10028 <![CDATA[Get control-alt-shift state]]> I would like to get the shift state even if I don't move the mouse...

Statistics: Posted by Gizzeta — 25 Aug 2009, 23:03


]]>
2009-08-25T22:47:34+02:00 2009-08-25T22:47:34+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10024#p10024 <![CDATA[Get control-alt-shift state]]>
But there is an error in the Userdefinitions.h file

CODE:

//----------------------------------------------------------------------------// keys state modifiers// used in MouseMove, MouseUp and MouseDown functions declaration &#40;see end of file&#41; typedef enum TShiftState &#123;   ssShift,   ssAlt,   ssCtrl,   ssLeft,   ssRight,   ssMiddle,   ssDouble   &#125;;
must be replaced by

CODE:

//----------------------------------------------------------------------------// keys state modifiers// used in MouseMove, MouseUp and MouseDown functions declaration &#40;see end of file&#41;typedef DWORD TShiftState ;static DWORD const ssShift = 0x1static DWORD const ssAlt = 0x2static DWORD const ssCtrl = 0x4static DWORD const ssLeft = 0x8static DWORD const ssRight = 0x10static DWORD const ssMiddle = 0x20static DWORD const ssDouble = 0x40
so you can check if 'Shift' contains one or several values above.

CODE:

if &#40;&#40;Shift & ssCtrl&#41; !=0&#41; &#123;..&#125; //means that the Ctrl key is pressed
This error will be 'officially' corrected in the next SDK release.

Statistics: Posted by senso — 25 Aug 2009, 22:47


]]>
2009-08-25T17:50:18+02:00 2009-08-25T17:50:18+02:00 https://brainmodular.com/forums/viewtopic.php?t=1701&p=10021#p10021 <![CDATA[Get control-alt-shift state]]>
Is there a way to always get the control, alt and shift state in a module, not only when the mouse is on the module panel?

thanks

Statistics: Posted by Gizzeta — 25 Aug 2009, 17:50


]]>