≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Feature request #524

Feature request #524: REQUEST: Make hot keys work when a fullscreen app/game is running

Kind feature request
Product Synergy
When Created 2006-12-19T15:21:44Z, updated 2007-04-04T09:42:24Z
Status open
Reporter julian
Tags no tags

Description

synergy and synergy advance don't work (hotkey) when a fullscreen app/game is running i suspect you are using some older mechanism for intercepting hot-keys like InstallEventHandler(), those don't work when a fullscreen app is in front. please use the newer method CGEventTapCreate() on macosx 10.4+ which also works in this case

here is code to get you started: http://pastebin.ca/285459

note: "Event taps receive key up and key down events if one of the following conditions is true:

• The current process is running as the root user. • Access for assistive devices is enabled. In Mac OS X v10.4, you can enable this feature using System Preferences, Universal Access panel, Keyboard view."

Comments

  1. Greg Hurrell 2006-12-20T04:12:31Z

    That's correct, I'm not using CGEventTapCreate at this stage and in fact hadn't heard of it until now. Synergy Advance is currently using InstallEventHandler and Synergy is watching for hot key events in the main application event loop (because it was written first, when I didn't yet know about InstallEventHandler).

    Given that CGEventTapCreate is Tiger-and-up I would have to use CGEventTapCreate when running on Tiger and up and fall back to InstallEventHandler on older systems.

    The limitations are a bit of a bummer. Just as the documentation indicates, I tried the sample code (assistive access turned off, normal privileges) and it failed; with root privileges it works even when assistive access is turned off. Running as root is definitely not an option because Apple recommends against running Cocoa apps with root privileges, and even if it didn't I wouldn't really want to run with those privileges anyway. Interestingly, I tried with assitive access turned on and with normal privileges, it worked and continued to work even after turning assistive access off; that's handy because it makes implementation a little bit easier.

    So that basically means that any implementation of this would require a two-level fallback; the first level would be weak-linking so as to be able to run on older versions of Mac OS X and the second level would be to try and on failing (in the event that assistive access is turned off) fall back to InstallEventHandler.

  2. Greg Hurrell 2006-12-20T04:12:54Z

    Created an attachment (id=89) example

  3. Greg Hurrell 2006-12-20T08:13:51Z

    Ok, I've got an initial implementation in place:

    https://wincent.dev/a/about/wincent/weblog/svn-log/archives/2006/12/wohotkey_r82_15_items_changed.php

    Still have to polish and test it but unless any problems appear this will go into the next release of Synergy Advance (0.5).

    Will leave this request open, however, because the implementation is only in place for Synergy Advance. The latter uses the WOHotKey framework for hot key support, while Synergy uses a custom application event loop, so it won't be so easy to make the necessary changes.

  4. Greg Hurrell 2006-12-20T08:21:23Z

    See also feature request #110.

  5. Greg Hurrell 2007-04-04T09:36:12Z

    If you wish to confirm that this bug is fixed you can try out one of the Synergy Advance nightly builds. As noted in the nightlies page, these are automated builds which represent a snapshot of the current development status. They are not tested and may have issues of their own; the latest official release (0.4) is still the one that's recommended for daily use.

    More information on nightlies here:

    https://wincent.dev/s/nightlies/

    A list of all Synergy Advance nightlies:

    https://wincent.dev/a/about/wincent/weblog/nightlog/archives/synergy_advance/

    Concretely, I believe this issues is fixed in revision 429 (link follows), or any later revision:

    https://wincent.dev/a/about/wincent/weblog/nightlog/archives/2007/04/synergy_advance_revision_429.php

  6. Greg Hurrell 2007-04-04T09:38:58Z

    Whoops. I accidentally attached my previous comment to this issue, which is a Synergy issue and I meant it to be for Synergy Advance. I'm going to mark the mistaken comment as "private" (invisible) so that it won't cause any future confusion for others who might view this ticket.

  7. Greg Hurrell 2007-04-04T09:42:24Z

    Going to leave this ticket open so that we can track the implementation of the feature in Synergy.

Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets