FreePie: Keyboard & Mouse to Vjoy experimentation
For games that don't allow using modifiers in their keybinds.
Not good at coding, and in fact suck very badly, I'm not trying to be a coder I just really want to have more keybinds in my games.
Download: Download snippet as freepie-keyboard-mouse-to-vjoy-experimentation.py.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!
#Global Vars consistent naming conventions ftw class keyname: def shiftkey(): keyboard.getKeyDown(keyboard.shift) def middlemouse(): mouse.middleButton def e(): keyboard.getKeyDown(keyboard.e) #Key Combo vars class combo: def shiftmiddlemouse(): keyname.shiftkey() and keyname.middlemouse() def shifte(): keyname.shiftkey() and keyname.e() #Joystick vars class gamepad: def joy1(): vJoy #Keybinds class keybind: class kbjoy1: def jshiftmiddlemouse(): if combo.shiftmiddlemouse(True): gamepad.joy1.setButton(0,True) print("Shift Mouse Middle detected") else: gamepad.joy1.setButton(0,False) def jshifte(): if combo.shifte(True): gamepad.joy1.setButton(1,True) print("Shift E detected") else: gamepad.joy1.setButton(1,False) def justshift(): if kayname.shift(True): gamepad.joy1.setbutton(2,True) else: gamepad.joy1.setbutton(2,False)
Create a free my code stock.com account now.
my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!Find out more and register now
You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.