'With which library I can bind hotkeys in python code?

I have a function and I want to bind this function to "ctrl"+"alt". I already used pynput, but it reacts even on typical "ctrl" or "alt". How to realize it in...more comfortable way? I tried pyautogui, but it too cause some strange things if I'm not mistaken.

     from pynput import keyboard
     with keyboard.GlobalHotKeys({'<ctrl>+<alt>': pognali}) as k:
         k.join()


Solution 1:[1]

This works very good!

    import keyboard
    keyboard.add_hotkey('ctrl+alt', pognali)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1