Ejemplo n.º 1
0
 def reset_hotkeys(self):
     try:
         self.printKeyShortcuts.clear()
         self.mulKeyShortcuts.clear()
         keyboard.remove_all_hotkeys()
     except AttributeError:
         pass
Ejemplo n.º 2
0
Archivo: piTV.py Proyecto: SteHun/piTV
 def submit(self):
     if self.selection != None:
         keyboard.remove_all_hotkeys()
         self.wheel_items[self.selection].run()
         keyboard.add_hotkey('up', root.up)
         keyboard.add_hotkey('down', root.down)
         keyboard.add_hotkey('left', root.left)
         keyboard.add_hotkey('right', root.right)
         keyboard.add_hotkey('enter', root.submit)
Ejemplo n.º 3
0
 def saldo_click_event(self, event):
     if (self.motion_event == False):
         self.motion_event = True
         self.click1_x = event.x
         self.click1_y = event.y
         keyboard.remove_all_hotkeys()
     else:
         self.motion_event = False
         keyboard.add_hotkey('space', lambda: self.on_closing())
Ejemplo n.º 4
0
def terminate_hotkey_hooks():
    """Release hotkey hooks for Freelancer. Should be run when, and only when, the Freelancer window is put into the
    background."""
    try:
        keyboard.remove_all_hotkeys()
    except AttributeError:
        pass  # a bug in keyboard (todo: submit PR)
    finally:
        keyboard.unhook_all()
Ejemplo n.º 5
0
    def on_closing(self):
        array = []
        array.append(self.coordenadas_mapeadas[:-1])
        array.append(self.configuracao_mepeamento[:-1])
        arquivo.salvar_arquivo('files//mapeamento.txt', array)
        if ('x' in dir(self) and 'y' in dir(self) and 'width' in dir(self)
                and 'height' in dir(self)):
            array = []
            array.append(self.resolucao + '=' + str(self.x) + ',' +
                         str(self.y) + ',' + str(self.width) + ',' +
                         str(self.height))
            arquivo.salvar_arquivo('files//posições_saldo.txt', array)

        keyboard.remove_all_hotkeys()
        self.destroy()
        self.frame_principal.confirm_button.config(state='normal')
        self.frame_principal.captura_button.config(text='Mapear Coordenadas')
Ejemplo n.º 6
0
Archivo: piTV.py Proyecto: SteHun/piTV
 def start(canvas):
     keyboard.remove_all_hotkeys()
     secret_text1 = canvas.create_text(1000,100,fill="white",font="sans-serif 25",text="WELCOME TO WARP ZONE!")
     secret_text2 = canvas.create_text(1000,130,fill="white",font="sans-serif 25",text="press the key of the option you want to choose")
     secret_text3 = canvas.create_text(1000,160,fill="white",font="sans-serif 25",text="[W]at is dit? Waar is mijn Netflix gebleven?(druk op [W])")
     secret_text4 = canvas.create_text(1000,190,fill="white",font="sans-serif 25",text="[E]xlpore the desktop! Close this user-friendly menu!")
     secret_text5 = canvas.create_text(1000,220,fill="white",font="sans-serif 25",text="[T]ermial. Hackers only!")
     secret_text6 = canvas.create_text(1000,250,fill="white",font="sans-serif 25",text="[R]eboot! No, not reshoe.")
     canvas.update()
     warpzone.start_hotkeys()
     global warpzone_done
     global warpzone_exit
     while not warpzone_done:
         canvas.update()
         time.sleep(0.1)
     if warpzone_exit:
         exit()
     keyboard.remove_all_hotkeys()
     canvas.delete(secret_text1)
     canvas.delete(secret_text2)
     canvas.delete(secret_text3)
     canvas.delete(secret_text4)
     canvas.delete(secret_text5)
     canvas.delete(secret_text6)
Ejemplo n.º 7
0
 def stop(self):
     keyboard.remove_all_hotkeys()
     self.anim.stop(self)
print(mido.get_output_names()
      )  # <---- this will print out midi ports for next command

outport = mido.open_output(
    'VMK 4'
)  # <--- this must be name of a virtual midi port on your machine as listed by above command


def sendmidi(data_):
    msg = mido.Message('sysex', data=data_)
    outport.send(msg)
    print(msg)


k1 = keyboard.add_hotkey('right', lambda: sendmidi(MMC + [0x04]))  # 7f7f0604
k2 = keyboard.add_hotkey('left', lambda: sendmidi(MMC + [0x05]))  # 7f7f0605

# send toggle off
send1 = keyboard.add_hotkey('ctrl+shift+1', lambda: sendmidi(SENDID + [0x1]))
send2 = keyboard.add_hotkey('ctrl+shift+2', lambda: sendmidi(SENDID + [0x2]))
send3 = keyboard.add_hotkey('ctrl+shift+3', lambda: sendmidi(SENDID + [0x3]))
send4 = keyboard.add_hotkey('ctrl+shift+4', lambda: sendmidi(SENDID + [0x4]))

synth1 = keyboard.add_hotkey('ctrl+shift+o', lambda: sendmidi(FIRSTSYNTHID))
synth1 = keyboard.add_hotkey('ctrl+alt+o', lambda: sendmidi(OPENMAINID))

print("Press ESC to stop.")
keyboard.wait('esc')
keyboard.remove_all_hotkeys()
outport.close()
Ejemplo n.º 9
0
 def stop_collect(self) -> None:
     self.is_run = False
     keyboard.remove_all_hotkeys()
Ejemplo n.º 10
0
 def unloadSoundSet(self):
     keyboard.remove_all_hotkeys()
     self.addListeners()
Ejemplo n.º 11
0
def accept():
    global accepted
    accepted = True
    keyboard.remove_all_hotkeys()