Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| // | |
| // main.m | |
| // UniversalStatusBarClient | |
| // | |
| #import <Cocoa/Cocoa.h> | |
| #import <IOKit/hid/IOHIDLib.h> | |
| NSArray* keyMap[256]; | |
| void fill_keyMap(NSArray * __strong map[]); |
| ObjC.import('Cocoa') | |
| ObjC.import('WebKit') | |
| App = Application.currentApplication() | |
| App.includeStandardAdditions = true | |
| MyAction = SimpleSubclass('Action', { | |
| quit(sender) { | |
| App.quit() | |
| }, |
| ObjC.import('Cocoa') | |
| ObjC.import('WebKit') | |
| MyWindow = WebViewWindow('http://www.youtube.com/') | |
| MyWindow.makeKeyAndOrderFront(null) | |
| //===================================================================== | |
| function Window(x, y, width, height) { | |
| let r = $.NSMakeRect(x, y, width, height) |
| # UPDATED 17 February 2019 | |
| # Redirect all HTTP traffic to HTTPS | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name www.domain.com domain.com; | |
| return 301 https://$host$request_uri; | |
| } | |
| # SSL configuration |
| -- AppleScript -- | |
| -- This example is meant as a simple starting point to show how to get the information in the simplest available way. | |
| -- Keep in mind that when asking for a `return` after another, only the first one will be output. | |
| -- This method is as good as its JXA counterpart. | |
| -- Webkit variants include "Safari", "Webkit", "Orion". | |
| -- Specific editions are valid, including "Safari Technology Preview". | |
| -- "Safari" Example: | |
| tell application "Safari" to return name of front document |
| /* | |
| * To compile objective-c on the command line: | |
| * | |
| * gcc -framework Foundation objc-gcc.m | |
| * | |
| * You may have to link with -lobjc or other libs, | |
| * as required. | |
| */ | |
| #import <Foundation/Foundation.h> |
| /* | |
| * ctrl-f1 | |
| * ------- | |
| * Query or toggle the "Full Keyboard Access" hotkey, Ctrl-F1 | |
| * | |
| * make CC=clang CFLAGS="-framework Carbon" ctrl-f1 | |
| */ | |
| #include <Carbon/Carbon.h> |