UnicodeResponder:
Filter:
Classes (extension) | External Control > Keyboard | Libraries > crucial > Keyboard

UnicodeResponder : Object
ExtensionExtension

register responder functions for unicode and modifier combinations

Description

This can be used to replace a function in a view's keydownAction. It matches modifier/unicode combinations and then evaluates the matched handler.

This is one of the simplest ways to accurately match the exact modifier combination you want.

If you merely check the modifier like so: (modifer & optionModifier ) == optionModifier or modifier.isAlt

then you will detect the presence of the options key, but not if ONLY the option key is present ( ie. it will match for shift-option as well )

see KeyCodeResponder

true: must be pressed false: must not be pressed nil: can be either pressed or not pressed

Use this to post the codes:

Class Methods

UnicodeResponder.new

UnicodeResponder.register(unicode, shift, caps, opt, cntl, function)

Arguments:

unicode
shift
caps
opt
cntl
function

UnicodeResponder.clear

UnicodeResponder.remove

UnicodeResponder.registerUnicode(modifier, unicode, function)

Arguments:

modifier
unicode
function

UnicodeResponder.registerUnicodeAll( ... sets)

Arguments:

... sets

UnicodeResponder.registerAll( ... sets)

Arguments:

... sets

UnicodeResponder.tester

UnicodeResponder.at(address)

Arguments:

address

UnicodeResponder.put(address, val)

Arguments:

address
val

UnicodeResponder.pushForUnicode(unicode, requireMask, denyMask, function, description)

Arguments:

unicode
requireMask
denyMask
function
description

UnicodeResponder.resetUnicode(unicode)

Arguments:

unicode

UnicodeResponder.value(view, char, modifiers, unicode, keycode)

Arguments:

view
char
modifiers
unicode
keycode

UnicodeResponder.global

Inherited class methods

Instance Methods

.dict

.dict = value

.value(view, char, modifier, unicode, keycode)

Arguments:

view
char
modifier
unicode
keycode

.normal( ... assns)

Arguments:

... assns

.shift( ... assns)

Arguments:

... assns

.control( ... assns)

Arguments:

... assns

.option( ... assns)

Arguments:

... assns

.register(unicode, shift, caps, opt, cntl, function, description)

Arguments:

unicode
shift
caps
opt
cntl
function
description

++(that)

Arguments:

that

.registerUnicode(modifier, unicode, function)

Arguments:

modifier
unicode
function

.registerUnicodeAll( ... sets)

Arguments:

... sets

.clear

.remove

.at(key)

Arguments:

key

.put(key, value)

Arguments:

key
value

.pushForUnicode(unicode, requireMask, denyMask, function, description)

Arguments:

unicode
requireMask
denyMask
function
description

.guiClass

.report

Inherited instance methods

Examples

The view in this example is merely to have something to focus on, it does nothing else.

Note that to match shift-a you have to specify "A", not "a"

You can also specify with ascii characters