Skip to content

Instantly share code, notes, and snippets.

View cobbal's full-sized avatar

Andrew Cobb cobbal

View GitHub Profile
@cobbal
cobbal / keyDown.swift
Last active August 29, 2015 14:04 — forked from bjhomer/keyDown.m
func keyDown(theEvent: NSEvent) {
func intToString(x : Int) -> String {
return String(UnicodeScalar(x))
}
let hasCommand = (theEvent.modifierFlags & .CommandKeyMask).value != 0
switch theEvent.charactersIgnoringModifiers! {
case intToString(NSUpArrowFunctionKey) where hasCommand == true:
// Scroll to top