Repository: autokey/autokey (language: python)

Issue:
Lags when a modal window opens
As there's no activity at the original autokey for two years already, I decided that better to leave this bugreport here.

Whenever a modal window opens in any of the applications, autokey stops working for some time. The duration of the lag depends on the amount of loaded scripts, so I think, that reinitialization of autokey somehow happens. I have 64 scripts, and the lag is about 5 seconds. Examples of such modal windows are "Go to Page" F2 window of Opera browser, search by filename (ctrl+shift+n) or class (ctrl+n) in Rubymine. Also I get a second lag when getting auto suggestions in rubymine.



Discussion / hints:
I see errors like this in console when it happens:
X protocol error:
`<class 'Xlib.error.BadWindow'>: code = 3, resource_id = <class 'Xlib.xobject.resource.Resource'>(0x06e001bc), sequence_number = 54312, major_opcode = 33, minor_opcode = 0`

Can you start Autokey with the -l option? That will give you more logging information.

```
2014-05-12 13:34:55,520 DEBUG - service - Window visible title: 'FocusProxy', Window class: 'Focus-Proxy-Window.FocusProxy'
2014-05-12 13:34:55,520 DEBUG - service - No phrase/script matched hotkey
2014-05-12 13:34:58,947 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'u'
2014-05-12 13:34:58,948 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'j'
2014-05-12 13:34:58,949 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'o'
2014-05-12 13:34:58,949 DEBUG - interface - Grabbing hotkey: ['<super>'] '.'
2014-05-12 13:34:58,949 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'o'
2014-05-12 13:34:58,950 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] '.'
2014-05-12 13:34:58,950 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'm'
2014-05-12 13:34:58,951 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'i'
2014-05-12 13:34:58,951 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] ','
2014-05-12 13:34:58,952 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'j'
2014-05-12 13:34:58,952 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'j'
2014-05-12 13:34:58,952 DEBUG - interface - Grabbing hotkey: ['<super>'] 'm'
2014-05-12 13:34:58,953 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'm'
2014-05-12 13:34:58,953 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'u'
2014-05-12 13:34:58,954 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'l'
2014-05-12 13:34:58,954 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'j'
2014-05-12 13:34:58,954 DEBUG - iomediator - <shift> released
2014-05-12 13:34:58,955 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] ','
2014-05-12 13:34:58,955 DEBUG - iomediator - <ctrl> released
2014-05-12 13:34:58,955 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] ','
2014-05-12 13:34:58,956 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'i'
2014-05-12 13:34:58,956 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'l'
2014-05-12 13:34:58,957 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] '.'
2014-05-12 13:34:58,957 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'u'
2014-05-12 13:34:58,958 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'i'
2014-05-12 13:34:58,958 DEBUG - interface - Grabbing hotkey: ['<super>'] 'i'
2014-05-12 13:34:58,958 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'l'
2014-05-12 13:34:58,959 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'j'
2014-05-12 13:34:58,959 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] ','
2014-05-12 13:34:58,959 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'o'
2014-05-12 13:34:58,959 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] '.'
2014-05-12 13:34:58,961 DEBUG - iomediator - <super> pressed
2014-05-12 13:34:58,961 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'l'
2014-05-12 13:34:58,961 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'm'
2014-05-12 13:34:58,961 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'i'
2014-05-12 13:34:58,962 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] '.'
2014-05-12 13:34:58,962 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'm'
2014-05-12 13:34:58,962 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'l'
2014-05-12 13:34:58,963 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] '.'
2014-05-12 13:34:58,963 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'm'
2014-05-12 13:34:58,965 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'o'
2014-05-12 13:34:58,965 DEBUG - service - Raw key: 'j', modifiers: ['<super>'], Key: j
2014-05-12 13:34:58,966 DEBUG - service - Window visible title: 'FocusProxy', Window class: 'Focus-Proxy-Window.FocusProxy'
2014-05-12 13:34:58,966 INFO - service - Matched hotkey phrase/script with prompt=False
2014-05-12 13:34:58,967 DEBUG - service - Script runner executing: Script('#j')
2014-05-12 13:34:58,967 DEBUG - service - Ignored locking error in handle_keypress
2014-05-12 13:35:00,697 DEBUG - interface - Grabbing hotkey: ['<super>'] ','
2014-05-12 13:35:00,698 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] '.'
2014-05-12 13:35:00,699 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'l'
2014-05-12 13:35:00,699 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:00,700 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'u'
2014-05-12 13:35:00,700 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] ','
2014-05-12 13:35:00,700 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] '.'
2014-05-12 13:35:00,701 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'u'
2014-05-12 13:35:00,701 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] ','
2014-05-12 13:35:00,702 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:00,702 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'm'
2014-05-12 13:35:00,702 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'o'
2014-05-12 13:35:00,703 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'i'
2014-05-12 13:35:00,703 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:00,704 DEBUG - interface - Grabbing hotkey: ['<super>'] 'o'
2014-05-12 13:35:00,704 DEBUG - interface - Grabbing hotkey: ['<super>'] 'l'
2014-05-12 13:35:00,704 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] ','
2014-05-12 13:35:00,705 DEBUG - iomediator - <super> released
2014-05-12 13:35:00,705 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:00,706 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'i'
2014-05-12 13:35:00,706 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:00,706 DEBUG - interface - Grabbing hotkey: ['<super>'] 'j'
2014-05-12 13:35:00,707 DEBUG - interface - Grabbing hotkey: ['<super>'] 'u'
2014-05-12 13:35:00,707 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:00,707 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'i'
2014-05-12 13:35:00,707 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'm'
2014-05-12 13:35:00,708 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'j'
2014-05-12 13:35:00,708 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'u'
2014-05-12 13:35:00,708 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'j'
2014-05-12 13:35:00,708 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'o'
2014-05-12 13:35:00,708 DEBUG - interface - Grabbing hotkey: ['<super>'] '.'
2014-05-12 13:35:00,708 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'o'
2014-05-12 13:35:00,708 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] '.'
2014-05-12 13:35:00,709 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'm'
2014-05-12 13:35:00,709 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'i'
2014-05-12 13:35:00,709 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] ','
2014-05-12 13:35:00,709 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'j'
2014-05-12 13:35:00,709 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:00,709 DEBUG - interface - Grabbing hotkey: ['<super>'] 'm'
2014-05-12 13:35:00,710 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'm'
2014-05-12 13:35:02,455 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:02,456 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:02,457 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'j'
2014-05-12 13:35:02,457 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] ','
2014-05-12 13:35:02,458 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] ','
2014-05-12 13:35:02,458 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:02,459 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:02,459 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] '.'
2014-05-12 13:35:02,459 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'u'
2014-05-12 13:35:02,459 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:02,459 DEBUG - interface - Grabbing hotkey: ['<super>'] 'i'
2014-05-12 13:35:02,460 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'l'
2014-05-12 13:35:02,460 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:02,460 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] ','
2014-05-12 13:35:02,460 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'o'
2014-05-12 13:35:02,460 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] '.'
2014-05-12 13:35:02,460 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'l'
2014-05-12 13:35:02,461 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:02,461 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:02,461 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] '.'
2014-05-12 13:35:02,461 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:02,461 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'l'
2014-05-12 13:35:02,461 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] '.'
2014-05-12 13:35:02,461 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:02,462 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:02,462 DEBUG - interface - Grabbing hotkey: ['<super>'] ','
2014-05-12 13:35:02,462 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] '.'
2014-05-12 13:35:02,462 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'l'
2014-05-12 13:35:02,462 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:02,462 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'u'
2014-05-12 13:35:02,463 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] ','
2014-05-12 13:35:02,463 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] '.'
2014-05-12 13:35:02,463 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'u'
2014-05-12 13:35:02,463 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] ','
2014-05-12 13:35:02,463 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:02,463 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'm'
2014-05-12 13:35:02,463 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'o'
2014-05-12 13:35:02,464 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'i'
2014-05-12 13:35:02,464 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:02,464 DEBUG - interface - Grabbing hotkey: ['<super>'] 'o'
2014-05-12 13:35:02,464 DEBUG - interface - Grabbing hotkey: ['<super>'] 'l'
2014-05-12 13:35:02,464 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] ','
2014-05-12 13:35:02,464 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:02,465 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'i'
2014-05-12 13:35:02,465 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:02,465 DEBUG - interface - Grabbing hotkey: ['<super>'] 'j'
2014-05-12 13:35:02,465 DEBUG - interface - Grabbing hotkey: ['<super>'] 'u'
2014-05-12 13:35:02,465 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:02,465 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'i'
2014-05-12 13:35:02,465 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'm'
2014-05-12 13:35:02,466 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'j'
2014-05-12 13:35:02,466 DEBUG - interface - Send special key: ['<left>']
2014-05-12 13:35:02,471 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'u'
2014-05-12 13:35:02,471 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'j'
2014-05-12 13:35:02,471 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'o'
2014-05-12 13:35:02,472 DEBUG - interface - Grabbing hotkey: ['<super>'] '.'
2014-05-12 13:35:02,472 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'o'
2014-05-12 13:35:02,472 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] '.'
2014-05-12 13:35:02,472 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'm'
2014-05-12 13:35:02,472 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'i'
2014-05-12 13:35:02,472 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] ','
2014-05-12 13:35:02,473 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'j'
2014-05-12 13:35:02,473 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:02,473 DEBUG - interface - Grabbing hotkey: ['<super>'] 'm'
2014-05-12 13:35:02,473 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'm'
2014-05-12 13:35:02,473 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:02,474 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:02,474 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'j'
2014-05-12 13:35:02,474 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] ','
2014-05-12 13:35:02,474 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] ','
2014-05-12 13:35:02,474 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:02,474 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:02,475 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] '.'
2014-05-12 13:35:02,475 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'u'
2014-05-12 13:35:02,475 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:02,475 DEBUG - interface - Grabbing hotkey: ['<super>'] 'i'
2014-05-12 13:35:02,475 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'l'
2014-05-12 13:35:02,475 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:02,476 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] ','
2014-05-12 13:35:02,476 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'o'
2014-05-12 13:35:02,476 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] '.'
2014-05-12 13:35:02,476 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'l'
2014-05-12 13:35:02,476 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:02,476 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:02,477 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] '.'
2014-05-12 13:35:02,477 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:02,477 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'l'
2014-05-12 13:35:02,477 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] '.'
2014-05-12 13:35:02,477 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:02,477 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:02,477 DEBUG - interface - Grabbing hotkey: ['<super>'] ','
2014-05-12 13:35:02,478 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] '.'
2014-05-12 13:35:02,478 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'l'
2014-05-12 13:35:02,478 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:02,478 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'u'
2014-05-12 13:35:02,478 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] ','
2014-05-12 13:35:02,478 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] '.'
2014-05-12 13:35:02,478 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'u'
2014-05-12 13:35:02,479 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] ','
2014-05-12 13:35:02,479 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:02,479 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'm'
2014-05-12 13:35:02,479 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'o'
2014-05-12 13:35:02,479 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'i'
2014-05-12 13:35:02,479 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:02,480 DEBUG - interface - Grabbing hotkey: ['<super>'] 'o'
2014-05-12 13:35:02,480 DEBUG - interface - Grabbing hotkey: ['<super>'] 'l'
2014-05-12 13:35:02,480 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] ','
2014-05-12 13:35:02,480 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:02,480 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'i'
2014-05-12 13:35:02,480 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:02,480 DEBUG - interface - Grabbing hotkey: ['<super>'] 'j'
2014-05-12 13:35:02,481 DEBUG - interface - Grabbing hotkey: ['<super>'] 'u'
2014-05-12 13:35:02,481 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:02,481 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'i'
2014-05-12 13:35:02,481 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'm'
2014-05-12 13:35:02,481 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'j'
2014-05-12 13:35:02,481 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'u'
2014-05-12 13:35:02,482 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'j'
2014-05-12 13:35:02,482 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'o'
2014-05-12 13:35:02,482 DEBUG - interface - Grabbing hotkey: ['<super>'] '.'
2014-05-12 13:35:02,482 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'o'
2014-05-12 13:35:02,482 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] '.'
2014-05-12 13:35:02,482 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'm'
2014-05-12 13:35:02,482 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'i'
2014-05-12 13:35:02,483 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] ','
2014-05-12 13:35:02,483 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'j'
2014-05-12 13:35:02,483 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:02,483 DEBUG - interface - Grabbing hotkey: ['<super>'] 'm'
2014-05-12 13:35:02,483 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'm'
2014-05-12 13:35:02,483 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:02,483 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:02,484 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'j'
2014-05-12 13:35:02,484 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] ','
2014-05-12 13:35:02,484 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] ','
2014-05-12 13:35:02,484 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:02,484 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:02,484 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] '.'
2014-05-12 13:35:02,485 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'u'
2014-05-12 13:35:02,485 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:02,485 DEBUG - interface - Grabbing hotkey: ['<super>'] 'i'
2014-05-12 13:35:02,485 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'l'
2014-05-12 13:35:02,485 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:02,485 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] ','
2014-05-12 13:35:02,486 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'o'
2014-05-12 13:35:02,486 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] '.'
2014-05-12 13:35:02,486 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'l'
2014-05-12 13:35:02,486 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:02,486 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:02,486 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] '.'
2014-05-12 13:35:02,487 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:02,487 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'l'
2014-05-12 13:35:02,487 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] '.'
2014-05-12 13:35:02,487 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:02,487 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:02,488 DEBUG - interface - Grabbing hotkey: ['<super>'] ','
2014-05-12 13:35:02,488 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] '.'
2014-05-12 13:35:02,488 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'l'
2014-05-12 13:35:02,488 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:02,488 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'u'
2014-05-12 13:35:02,489 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] ','
2014-05-12 13:35:02,489 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] '.'
2014-05-12 13:35:02,489 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'u'
2014-05-12 13:35:02,489 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] ','
2014-05-12 13:35:02,490 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:02,490 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'm'
2014-05-12 13:35:02,490 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'o'
2014-05-12 13:35:02,490 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'i'
2014-05-12 13:35:02,490 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:02,491 DEBUG - interface - Grabbing hotkey: ['<super>'] 'o'
2014-05-12 13:35:02,491 DEBUG - interface - Grabbing hotkey: ['<super>'] 'l'
2014-05-12 13:35:02,491 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] ','
2014-05-12 13:35:02,491 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:02,491 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'i'
2014-05-12 13:35:02,491 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:02,491 DEBUG - interface - Grabbing hotkey: ['<super>'] 'j'
2014-05-12 13:35:02,492 DEBUG - interface - Grabbing hotkey: ['<super>'] 'u'
2014-05-12 13:35:02,492 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:02,492 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'i'
2014-05-12 13:35:02,492 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'm'
2014-05-12 13:35:02,492 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'j'
2014-05-12 13:35:03,152 DEBUG - iomediator - <alt> pressed
2014-05-12 13:35:03,262 DEBUG - service - Raw key: '<tab>', modifiers: ['<alt>'], Key: <tab>
2014-05-12 13:35:03,262 DEBUG - service - Window visible title: 'FocusProxy', Window class: 'Focus-Proxy-Window.FocusProxy'
2014-05-12 13:35:03,263 DEBUG - service - No phrase/script matched hotkey
2014-05-12 13:35:03,360 DEBUG - iomediator - <alt> released
2014-05-12 13:35:04,066 DEBUG - iomediator - <alt> pressed
2014-05-12 13:35:04,116 DEBUG - service - Raw key: '<tab>', modifiers: ['<alt>'], Key: <tab>
2014-05-12 13:35:04,116 DEBUG - service - Window visible title: 'FocusProxy', Window class: 'Focus-Proxy-Window.FocusProxy'
2014-05-12 13:35:04,116 DEBUG - service - No phrase/script matched hotkey
2014-05-12 13:35:04,730 DEBUG - service - Raw key: '<tab>', modifiers: ['<alt>'], Key: <tab>
2014-05-12 13:35:04,731 DEBUG - service - Window visible title: 'FocusProxy', Window class: 'Focus-Proxy-Window.FocusProxy'
2014-05-12 13:35:04,731 DEBUG - service - No phrase/script matched hotkey
2014-05-12 13:35:04,896 DEBUG - iomediator - <alt> released
2014-05-12 13:35:10,305 DEBUG - service - Received mouse click - resetting buffer
2014-05-12 13:35:19,495 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'u'
2014-05-12 13:35:19,495 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'j'
2014-05-12 13:35:19,496 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'o'
2014-05-12 13:35:19,496 DEBUG - interface - Grabbing hotkey: ['<super>'] '.'
2014-05-12 13:35:19,496 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'o'
2014-05-12 13:35:19,496 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] '.'
2014-05-12 13:35:19,496 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'm'
2014-05-12 13:35:19,497 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'i'
2014-05-12 13:35:19,497 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] ','
2014-05-12 13:35:19,497 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'j'
2014-05-12 13:35:19,497 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:19,497 DEBUG - interface - Grabbing hotkey: ['<super>'] 'm'
2014-05-12 13:35:19,498 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'm'
2014-05-12 13:35:19,498 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:19,498 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:19,498 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'j'
2014-05-12 13:35:19,498 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] ','
2014-05-12 13:35:19,498 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] ','
2014-05-12 13:35:19,499 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:19,499 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:19,499 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] '.'
2014-05-12 13:35:19,499 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'u'
2014-05-12 13:35:19,499 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:19,500 DEBUG - interface - Grabbing hotkey: ['<super>'] 'i'
2014-05-12 13:35:19,500 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'l'
2014-05-12 13:35:19,500 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:19,500 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] ','
2014-05-12 13:35:19,500 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'o'
2014-05-12 13:35:19,500 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] '.'
2014-05-12 13:35:19,501 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'l'
2014-05-12 13:35:19,501 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:19,501 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'i'
2014-05-12 13:35:19,501 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] '.'
2014-05-12 13:35:19,501 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:19,501 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'l'
2014-05-12 13:35:19,501 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] '.'
2014-05-12 13:35:19,502 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'm'
2014-05-12 13:35:19,502 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:19,502 DEBUG - interface - Grabbing hotkey: ['<super>'] ','
2014-05-12 13:35:19,502 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] '.'
2014-05-12 13:35:19,502 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'l'
2014-05-12 13:35:19,502 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:19,503 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'u'
2014-05-12 13:35:19,503 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<shift>', '<super>'] ','
2014-05-12 13:35:19,503 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] '.'
2014-05-12 13:35:19,503 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'u'
2014-05-12 13:35:19,503 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] ','
2014-05-12 13:35:19,503 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'l'
2014-05-12 13:35:19,504 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'm'
2014-05-12 13:35:19,504 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'o'
2014-05-12 13:35:19,504 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] 'i'
2014-05-12 13:35:19,504 DEBUG - interface - Grabbing hotkey: ['<alt>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:19,504 DEBUG - interface - Grabbing hotkey: ['<super>'] 'o'
2014-05-12 13:35:19,504 DEBUG - interface - Grabbing hotkey: ['<super>'] 'l'
2014-05-12 13:35:19,505 DEBUG - interface - Grabbing hotkey: ['<alt>', '<super>'] ','
2014-05-12 13:35:19,505 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'u'
2014-05-12 13:35:19,505 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'i'
2014-05-12 13:35:19,505 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'j'
2014-05-12 13:35:19,505 DEBUG - interface - Grabbing hotkey: ['<super>'] 'j'
2014-05-12 13:35:19,505 DEBUG - interface - Grabbing hotkey: ['<super>'] 'u'
2014-05-12 13:35:19,506 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<shift>', '<super>'] 'o'
2014-05-12 13:35:19,506 DEBUG - interface - Grabbing hotkey: ['<ctrl>', '<super>'] 'i'
2014-05-12 13:35:19,506 DEBUG - interface - Grabbing hotkey: ['<alt>', '<ctrl>', '<super>'] 'm'
2014-05-12 13:35:19,506 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'j'
```

As you see, it started to reinitialize hotkeys, so super+j hotkey didn't work.

Can you retry with latest git HEAD, and reopen with a reliable reproduction case if the problem reoccurs?

Fix patch:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index bb48d7e3..e2e3b056 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -16,7 +16,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: [3.9]
+        python-version: [3.10]
     steps:
     - uses: actions/checkout@v2
       with:
@@ -64,7 +64,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: [3.9]
+        python-version: [3.10]
     steps:
     - uses: actions/checkout@v2
     - name: Set up Python ${{ matrix.python-version }}
@@ -110,7 +110,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: [3.9]
+        python-version: [3.10]
     needs: [build_pypi_wheel, build_deb]
     steps:
     - uses: actions/checkout@v2
@@ -125,7 +125,7 @@ jobs:
         ref: ${{ github.ref }}
         repo-token: ${{ secrets.GITHUB_TOKEN }}
         wait-interval: 10
-        check-name: 'pytest (3.9)'
+        check-name: 'pytest (3.10)'
 
     - name: Download built dist as artifact
       uses: actions/download-artifact@master
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index d5d173bf..399d8108 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -17,11 +17,12 @@ Features
 ---------
 Create a GUI-free headless entrypoint to autokey, which can be run without GUI libraries and controlled purely via scripting API
 
-.. Bug fixes
-.. ---------
+Bug fixes
+---------
 
 - Fix crash in qt macro recording window.
 - Fix fake keyboard events not being emitted in a timely manner in some cases
+- Upgrade the **develop** branch to satisfy issue #773.
 
 Version 0.96.0-beta.9
 ============================
diff --git a/apt-requirements.txt b/apt-requirements.txt
index 9a191049..ac00325e 100644
--- a/apt-requirements.txt
+++ b/apt-requirements.txt
@@ -1,6 +1,5 @@
 dbus
 python3-dbus
-python-dbus
 libdbus-1-dev
 libpython3-dev
 libdbus-glib-1-dev
@@ -12,7 +11,7 @@ gir1.2-appindicator3-0.1
 gir1.2-glib-2.0
 gir1.2-notify-0.7
 python3-gi
-python-gobject
 zenity
 kdialog
 pyqt5-dev-tools
+x11-xserver-utils
diff --git a/setup.cfg b/setup.cfg
index c65f16c3..76c96639 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -20,7 +20,7 @@ addopts =
 
 
 [tox:tox]
-; envlist = py36,py39
+; envlist = py37,py310
 ; Only run test environment by default, so just running `tox` is fast
 ; and doesn't include the overhead of coverage or any other build
 ; pathways.
@@ -42,7 +42,10 @@ deps =
 ; Pass args to pytest by including them in the tox call after a `--`, eg tox
 ; -- tests/test_something.py
 commands = pytest {posargs}
-passenv = DISPLAY DBUS_SESSION_BUS_ADDRESS USER
+passenv =
+    DISPLAY
+    DBUS_SESSION_BUS_ADDRESS
+    USER
 
 [testenv:test]
 deps = {[testenv]deps}
diff --git a/setup.py b/setup.py
index 5ffec210..0568eb85 100755
--- a/setup.py
+++ b/setup.py
@@ -33,8 +33,8 @@
 else:
     import setuptools.command.build_py
 
-if sys.version_info < (3, 5, 0):
-    print("Autokey requires Python 3.5 or later. You are using " + ".".join(map(str, sys.version_info[:3])))
+if sys.version_info < (3, 7, 15):
+    print("Autokey requires Python 3.7.15 or later. You are using " + ".".join(map(str, sys.version_info[:3])))
     sys.exit(1)
 
 
@@ -137,7 +137,7 @@ def _copy_icon_files_into_qt_resources_directory(self, resource_dir: Path):
     # If using this, would have to also set common.VERSION from this so that
     # the autokey 'about' menu shows the correct version.
     # use_scm_version=True,
-    python_requires=">=3.5",
+    python_requires=">=3.7.15",
     # This requires autokey submodules (subdirectories) to contain their own `__init__.py` file (i.e.
     # they advertise themselves as modules).
     # find_namespace_packages might be a better alternative that doesn't
@@ -209,7 +209,7 @@ def _copy_icon_files_into_qt_resources_directory(self, resource_dir: Path):
         'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
         'Natural Language :: English',
         'Operating System :: POSIX :: Linux',
-        'Programming Language :: Python :: 3.5',
+        'Programming Language :: Python :: 3.7',
     ],
     keywords='automation hotkey expansion expander phrase macros keyboard auto key autokey ak shortcuts bind autohotkey mouse customization',
 )


Test patch:
diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml
index e0ab9d23..63c51be3 100644
--- a/.github/workflows/python-test.yml
+++ b/.github/workflows/python-test.yml
@@ -4,135 +4,136 @@
 name: Python test
 
 on:
+  # workflow_dispatch:
   push:
+    # paths:
+    #  - "**.py"
     # Test on tags to ensure that the version metadata has been updated in tag as well.
     tags:
-      - '*'
-    branches: [ CI, master, develop, beta ]
+      - "*"
+    branches: [master, develop, beta]
   pull_request:
-    branches: [ master, develop, beta ]
+    branches: [master, develop, beta]
 
 jobs:
   Lint:
-
     runs-on: ubuntu-latest
 
     strategy:
       matrix:
-        python-version: [3.6, 3.7, 3.9]
+        python-version: ["3.7", "3.10"]
 
     steps:
-    - uses: actions/checkout@v2
-    - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v2
-      with:
-        python-version: ${{ matrix.python-version }}
-
-    - name: Cache pip
-      uses: actions/cache@v2
-      with:
-        # This path is specific to Ubuntu
-        path: ~/.cache/pip
-        # Look to see if there is a cache hit for the corresponding requirements file
-        key: ${{ runner.os }}-pip-${{ hashFiles('pip-requirements.txt') }}
-        restore-keys: |
-          ${{ runner.os }}-pip-
-          ${{ runner.os }}-
-    - name: Install dependencies
-      run: |
-        sudo apt update
-        sudo apt install $(cat apt-requirements.txt)
-        python -m pip install --upgrade pip
-        pip install flake8 wheel
-        pip install -r pip-requirements.txt
-
-    - name: Python Code Quality and Lint
-      uses: ricardochaves/python-lint@v1.3.0
-      with:
-        python-root-list: "lib/autokey tests"
-        use-pylint: false
-        use-pycodestyle: false
-        use-flake8: true
-        use-black: false
-        use-mypy: false
-        use-isort: false
-        extra-pylint-options: ""
-        extra-pycodestyle-options: ""
-        # select = stop the build if there are Python syntax errors or undefined names
-        # exit-zero treats all errors as warnings.
-        # "_" is part of gettext, not actually a built-in, but used almost
-        # everywhere without explicit definition.
-        # The GitHub editor is 127 chars wide.
-        extra-flake8-options: >
-          --count
-          --select=E9,F63,F7,F82
-          --show-source
-          --statistics
-          --builtins=_
-          --max-complexity=10
-          --max-line-length=127
-        extra-black-options: ""
-        extra-mypy-options: ""
-        extra-isort-options: ""
+      - uses: actions/checkout@v3
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v4
+        with:
+          python-version: "${{ matrix.python-version }}"
+
+      - name: Cache pip
+        uses: actions/cache@v3
+        with:
+          # This path is specific to Ubuntu
+          path: ~/.cache/pip
+          # Look to see if there is a cache hit for the corresponding requirements file
+          key: ${{ runner.os }}-pip-${{ hashFiles('pip-requirements.txt') }}
+          restore-keys: |
+            ${{ runner.os }}-pip-
+            ${{ runner.os }}-
+
+      - name: Install dependencies
+        run: |
+          sudo apt update
+          sudo apt install $(cat apt-requirements.txt)
+          python -m pip install --upgrade pip
+          pip install flake8 wheel
+          pip install -r pip-requirements.txt
+          
+      - name: Python Code Quality and Lint
+        uses: ricardochaves/python-lint@v1.4.0
+        with:
+          python-root-list: "lib/autokey tests"
+          use-pylint: false
+          use-pycodestyle: false
+          use-flake8: true
+          use-black: false
+          use-mypy: false
+          use-isort: false
+          extra-pylint-options: ""
+          extra-pycodestyle-options: ""
+          # select = stop the build if there are Python syntax errors or undefined names
+          # exit-zero treats all errors as warnings.
+          # "_" is part of gettext, not actually a built-in, but used almost
+          # everywhere without explicit definition.
+          # The GitHub editor is 127 chars wide.
+          extra-flake8-options: >
+            --count
+            --select=E9,F63,F7,F82
+            --show-source
+            --statistics
+            --builtins=_
+            --max-complexity=10
+            --max-line-length=127
+          extra-black-options: ""
+          extra-mypy-options: ""
+          extra-isort-options: ""
 
   pytest:
-
     runs-on: ubuntu-latest
 
     strategy:
       matrix:
-        python-version: [3.6, 3.7, 3.9]
+        python-version: ["3.7", "3.10"]
 
     steps:
-    - uses: actions/checkout@v2
-      with:
-        fetch-depth: 0
-    - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v2
-      with:
-        python-version: ${{ matrix.python-version }}
-
-    - name: Cache pip
-      uses: actions/cache@v2
-      with:
-        # This path is specific to Ubuntu
-        path: ~/.cache/pip
-        # Look to see if there is a cache hit for the corresponding requirements file
-        key: ${{ runner.os }}-pip-${{ hashFiles('pip-requirements.txt') }}
-        restore-keys: |
-          ${{ runner.os }}-pip-
-          ${{ runner.os }}-
-    - name: Install dependencies
-      run: |
-        sudo apt update
-        sudo apt install $(cat apt-requirements.txt)
-        python -m pip install --upgrade pip
-        pip install flake8 tox pytest pytest-cov wheel
-        pip install -r pip-requirements.txt
-
-    - name: Test with tox and pytest
-      run: |
-        tox -e clean,coverage,report
-
-    - name: Upload pytest test results
-      uses: actions/upload-artifact@v2
-      with:
-        name: pytest-results-${{ matrix.python-version }}
-        path: junit/test-results-${{ matrix.python-version }}.xml
-      # Use always() to always run this step to publish test results when there are test failures
-      if: ${{ always() }}
-
-    - name: Archive test coverage report
-      run: |
-        tar -cvzf test_coverage_report-${{ matrix.python-version }}.tar.gz test_coverage_report_html/
-
-    - name: Upload test coverage report
-      uses: actions/upload-artifact@v2
-      with:
-        name: test_coverage_report-${{ matrix.python-version }}.tar.gz
-        path: test_coverage_report-${{ matrix.python-version }}.tar.gz
-      # Use always() to always run this step to publish test results when there are test failures
-      if: ${{ always() }}
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v4
+        with:
+          python-version: "${{ matrix.python-version }}"
+
+      - name: Cache pip
+        uses: actions/cache@v3
+        with:
+          # This path is specific to Ubuntu
+          path: ~/.cache/pip
+          # Look to see if there is a cache hit for the corresponding requirements file
+          key: ${{ runner.os }}-pip-${{ hashFiles('pip-requirements.txt') }}
+          restore-keys: |
+            ${{ runner.os }}-pip-
+            ${{ runner.os }}-
+
+      - name: Install dependencies
+        run: |
+          sudo apt update
+          sudo apt install $(cat apt-requirements.txt)
+          python -m pip install --upgrade pip
+          pip install flake8 tox pytest pytest-cov wheel
+          pip install -r pip-requirements.txt
+
+      - name: Test with tox and pytest
+        run: tox -e clean,coverage,report
+
+      - name: Upload pytest test results
+        uses: actions/upload-artifact@v3
+        with:
+          name: pytest-results-${{ matrix.python-version }}
+          path: junit/test-results-${{ matrix.python-version }}.xml
+        # Use always() to always run this step to publish test results when there are test failures
+        if: ${{ always() }}
+
+      - name: Archive test coverage report
+        run: tar -cvzf test_coverage_report-${{ matrix.python-version }}.tar.gz test_coverage_report_html/
+
+      - name: Upload test coverage report
+        uses: actions/upload-artifact@v3
+        with:
+          name: test_coverage_report-${{ matrix.python-version }}.tar.gz
+          path: test_coverage_report-${{ matrix.python-version }}.tar.gz
+        # Use always() to always run this step to publish test results when there are test failures
+        if: ${{ always() }}
 
   test-install:
     # Just runs basic app options to ensure pip installation has included relevant imports and put app in path.
@@ -141,26 +142,25 @@ jobs:
 
     strategy:
       matrix:
-        python-version: [3.6, 3.7, 3.9]
+        python-version: ["3.7", "3.10"]
 
     steps:
-    - uses: actions/checkout@v2
-    - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v2
-      with:
-        python-version: ${{ matrix.python-version }}
-
-    - name: Install OS dependencies only
-      run: |
-        sudo apt update
-        sudo apt install $(cat apt-requirements.txt)
-        python -m pip install --upgrade pip
-        pip install dbus-python gobject pygobject PyQt5 qscintilla
-
-    - name: Test installation
-      run: |
-        pip install "${GITHUB_WORKSPACE}"
-        autokey-gtk --help
-        # qt xcb module requires a display to connect to, so won't work.
-        # export QT_DEBUG_PLUGINS=1
-        # autokey-qt --help
+      - uses: actions/checkout@v3
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v4
+        with:
+          python-version: "${{ matrix.python-version }}"
+
+      - name: Install OS dependencies only
+        run: |
+          sudo apt update
+          sudo apt install $(cat apt-requirements.txt)
+          python -m pip install --upgrade pip
+          pip install dbus-python gobject pygobject PyQt5 qscintilla
+      - name: Test installation
+        run: |
+          pip install "${GITHUB_WORKSPACE}"
+          autokey-gtk --help
+          # qt xcb module requires a display to connect to, so won't work.
+          # export QT_DEBUG_PLUGINS=1
+          # autokey-qt --help