How to Make Keyboard Effective Only for FREEPIE

Official forum for open source FreePIE discussion and development.
Post Reply
zhu8888rui
One Eyed Hopeful
Posts: 2
Joined: Tue Dec 25, 2018 3:49 am

How to Make Keyboard Effective Only for FREEPIE

Post by zhu8888rui »

For example, I set four keys W, A, S, D. How to make any game and program prohibit using these four keys, only FREEPIE can use them. How to write the code?
Last edited by zhu8888rui on Tue Dec 25, 2018 4:26 am, edited 1 time in total.
zhu8888rui
One Eyed Hopeful
Posts: 2
Joined: Tue Dec 25, 2018 3:49 am

Re: How to Make Keyboard Effective Only for FREEPIE

Post by zhu8888rui »

Code: Select all

if keyboard.getKeyDown(Key.W): vJoy[0].setButton(1, True) 
else: vJoy[0].setButton(1, False)
if keyboard.getKeyDown(Key.A): vJoy[0].setButton(2, True) 
else: vJoy[0].setButton(2, False)
if keyboard.getKeyDown(Key.S): vJoy[0].setButton(3, True) 
else: vJoy[0].setButton(3, False)
if keyboard.getKeyDown(Key.D): vJoy[0].setButton(4, True) 
else: vJoy[0].setButton(4, False)
marcob
One Eyed Hopeful
Posts: 7
Joined: Sun Sep 11, 2016 6:27 am

Re: How to Make Keyboard Effective Only for FREEPIE

Post by marcob »

Hi . What this code can do? Thanks
konstantin_lozev
Cross Eyed!
Posts: 192
Joined: Fri Jul 04, 2014 1:43 am

Re: How to Make Keyboard Effective Only for FREEPIE

Post by konstantin_lozev »

I am not sure if FreePIE can block the keyboard press. I have had success with GlovePIE, though. The command there is "swallow", if I remember well. Have a look at the GlovePIE wiki.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: How to Make Keyboard Effective Only for FREEPIE

Post by CyberVillain »

Freepie do not support blockign other programs from reading keys. Its been on the todo for a long time
Post Reply

Return to “FreePIE”