Capture Ctl & Alt & Insert

General FreeBASIC programming questions.
Gablea
Posts: 1049
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Capture Ctl & Alt & Insert

Postby Gablea » Jan 11, 2019 16:14

Hi everyone

I was wondering if someone has a example as how I can capture the Key combo of Ctl & Alt & Insert (almost like the Ctrl, Alt and Delete combo) as I would like to use this to load a "hidden" menu with in my program

if someone has the code for the Ctrl & alt and delete then I could adapt that

Meany thanks :)
Tourist Trap
Posts: 2762
Joined: Jun 02, 2015 16:24

Re: Capture Ctl & Alt & Insert

Postby Tourist Trap » Jan 11, 2019 16:55

Hello,

maybe you can try this from D.J.Peters. I used it times ago, but I don't remember well what I got. It will work for 32bits anyway. I don't know for 64. And in any case you can ask the author if you think it does the job, he is a cool man :)
viewtopic.php?f=7&t=2289&p=16566#p16566
badidea
Posts: 1458
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Capture Ctl & Alt & Insert

Postby badidea » Jan 11, 2019 17:07

Code: Select all

#include "fbgfx.bi"

dim as integer specialKeyPressed

while not multikey(fb.SC_ESCAPE)
   if multikey(fb.SC_CONTROL) and multikey(fb.SC_ALT) and multikey(fb.SC_INSERT) then
      if specialKeyPressed  = 0 then
         specialKeyPressed = 1
         print "specialKey Pressed"
      end if
   else
      if specialKeyPressed = 1 then
         specialKeyPressed = 0
         print "specialKey Released"
      end if
   end if
   sleep 1
wend
Print "End"
Gablea
Posts: 1049
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: Capture Ctl & Alt & Insert

Postby Gablea » Jan 11, 2019 17:09

Thanks for the advice guys. would this work on Linux? (and I know I am pushing it but would it work on DOS?)
badidea
Posts: 1458
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Capture Ctl & Alt & Insert

Postby badidea » Jan 11, 2019 18:48

My piece of code works on linux. Can't say anything about DOS.
Gablea
Posts: 1049
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: Capture Ctl & Alt & Insert

Postby Gablea » Jan 11, 2019 19:04

Ok I’ll try it and let you know :)

Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests