It is currently Thu Oct 17, 2019 2:28 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Keyboard without Screen? Possible!
PostPosted: Wed Oct 15, 2014 9:34 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Apr 15, 2013 12:22 pm
Posts: 519
Heyho,
my Debugger was disabled and I compiled a code like this:
Code:
;-Compile this without Debugger
EnableExplicit


Define.i event, Quit


InitSprite()
InitKeyboard()


OpenWindow(#PB_Any, 0, 0, 1800, 1000, "AudioIn-Out Test", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)


Repeat
  Repeat
    event = WindowEvent()
   
    Select event
      Case #PB_Event_CloseWindow
        Quit = 1
       
    EndSelect
   
  Until event = 0
 
  If ExamineKeyboard()
   
  EndIf
 
Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1

End

It runs perfect, if I push Escape program stops normal.
But when I enable Debugger, it says I have to open a Screen. But why I should do this? It works even without Screen Oo

Is there any reason why I must open a Screen for mouse- and keyboardthings?

Greets,
Bananenfreak

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Keyboard without Screen? Possible!
PostPosted: Wed Oct 15, 2014 9:43 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13622
Location: France
It's because it uses directX on Windows, which shouldn't be requiered for normal application.


Top
 Profile  
Reply with quote  
 Post subject: Re: Keyboard without Screen? Possible!
PostPosted: Fri Oct 17, 2014 10:45 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Apr 15, 2013 12:22 pm
Posts: 519
So on Windows there is no problem with Mouse and Keyboard without Screen... what about deleting that red alert and adding a warning instead of it?
It would be great to use Keyboard without screen in a larger project WITH debugger

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Keyboard without Screen? Possible!
PostPosted: Wed Dec 03, 2014 12:25 pm 
Offline
Addict
Addict

Joined: Sat Jun 30, 2007 8:04 pm
Posts: 3334
Here is a work-around for using the keyboard library with and without the debugger:

http://purebasic.fr/english/viewtopic.php?f=12&t=61127


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye