0

How can I press j and f with the module "PyKeyboard"?

I already got this:

from pykeyboard import PyKeyboard
k = PyKeyboard()

# To Create an Alt+Tab combo
k.press_key(k.alt_key)
k.tap_key(k.tab_key)
k.release_key(k.alt_key)

while True:
        k.press_key(k.j_key)
        k.press_key(k.f_key)

But this isn't working.

Thank you

Hamiraro
  • 3
  • 1
  • 4

1 Answers1

1

I think this may work,

from pykeyboard import PyKeyboard
k = PyKeyboard()

# To Create an Alt+Tab combo
k.press_key(k.alt_key)
k.tap_key(k.tab_key)
k.release_key(k.alt_key)

while True:
    k.press_key(k."j")
    k.press_key(k."f")

Credit to: https://stackoverflow.com/a/32582125

Dubber Rucky
  • 111
  • 4