Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
289 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module uiold | ||
|
||
#flag -framework Carbon | ||
#flag -framework Cocoa | ||
|
||
#include <Cocoa/Cocoa.h> | ||
#include <Carbon/Carbon.h> | ||
|
||
__global default_font &C.NSFont | ||
|
||
|
||
fn focus_app(next, event, data voidptr) { | ||
#NSLog(@"2The hot key was pressed."); | ||
#NSApplication *myApp = [NSApplication sharedApplication]; | ||
#[myApp activateIgnoringOtherApps:YES]; | ||
//return noErr; | ||
} | ||
|
||
pub fn reg_key_vid() { | ||
println('REGISTERING VID KEY') | ||
#EventHotKeyRef gMyHotKeyRef; | ||
|
||
#EventHotKeyID gMyHotKeyID; | ||
#EventTypeSpec eventType; | ||
#eventType.eventClass = kEventClassKeyboard; | ||
#eventType.eventKind = kEventHotKeyPressed; | ||
#InstallApplicationEventHandler(&uiold__focus_app, 1, &eventType, NULL, NULL); | ||
#gMyHotKeyID.signature = 'rml1'; | ||
#gMyHotKeyID.id = 1; | ||
#RegisterEventHotKey(kVK_ANSI_1, cmdKey, gMyHotKeyID, | ||
#GetApplicationEventTarget(), 0, &gMyHotKeyRef); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module uiold | ||
|
||
fn focus_app(next, event, data voidptr) { | ||
} | ||
|
||
pub fn reg_key_vid() { | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module uiold | ||
|
||
fn focus_app(next, event, data voidptr) { | ||
} | ||
|
||
pub fn reg_key_vid() { | ||
} | ||
|
||
|
Oops, something went wrong.