Skip to content
Binding for JFHotkeyManager
Objective-C C# Smalltalk
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

NuGet Status


Xamarin binding for the JFHotkeyManager

JFHotkeyManager is a small Cocoa convenience wrapper around Carbon's mechanism for implementing global hotkeys. It allows you to add hotkeys to your app with a couple of lines of code.


Hotkeys can be bound either by individually specifying keycode/modifiers, or symbolically using a string. The latter is more convenient but probably less reliable across international keyboards.

// Initialise a new hotkey manager
var hotkeyManager = new JFHotkeyManager();
// Bind a hotkey by key code reference number and modifiers:
hotkeyManager.BindKeyRef(49, (uint)(EModifierKeys.CmdKey | EModifierKeys.ShiftKey), this, new ObjCRuntime.Selector("onHotkeyExecuted"));
// Bind a hotkey symbolically
hotkeyManager.Bind("command shift up", this, new ObjCRuntime.Selector("onHotkeyExecuted"));

void OnHotkeyExecuted()
  // do something
You can’t perform that action at this time.