[REBOL] Re: Disabling shortcut Keys for text field entry?
From: g:santilli:tiscalinet:it at: 9-Jul-2001 19:38
Hello Brett!
On 09-Lug-01, you wrote:
BH> Any ideas for a simple way to make shortcut keys specific?
- patch LAYOUT so that keys are collected in a key-face table
- patched LAYOUT puts the table in the window's face and puts
up a handler that looks in the table for keys
- the window face should also contain a charset that says wich
keys should be catched even when a field/area is active
- the handler just has to:
either system/view/focal-face [
; there's an active face. catch only keys in charset
] [
; no active face; catch any key in table
]
Notice that not only Fields and Areas may become active. Text
become active too for clipboard operation; you might want to
disable normal keys only when a Field or similar face is active;
you could check the face's flags:
either flag-face? system/view/focal-face wants-keys [
; ...
] [
; ...
]
and you can:
flag-face get-style 'field wants-keys
flag-face get-style 'area wants-keys
before the user creates any custom style, so that if (s)he derives
one of its styles from Field or Area (s)he will get correct keys
behavious on them too.
Just thinking loud,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/