Search code examples
pythonsendkeyspywinauto

Python pywinauto enter symbols or raw key entry


I'm using pywinauto sendkeys to enter some data into a window. I have symbols like % ^ ! +. As sendkeys uses it was hotkeys for some keys in windows os I wan't to enter this symbols ignoring the hotkeys. It don't need to press hotkeys at this symbols. Please help me out.


Solution

  • They could be unescaped by {} as I remember. Like this:

    from pywinauto.keyboard import send_keys
    send_keys("{%}{!}{^}")
    

    will print out: %!^