Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: key events... hacking...

From: g:santilli:tiscalinet:it at: 21-Jan-2004 10:05

Hi Maxim, On Wednesday, January 21, 2004, 12:23:35 AM, you wrote: MOA> Is anyone capable of getting keyboard events for faces MOA> which are not "focused", short of rewriting the whole event MOA> handler? This is a modified window feel I use in some applications; it allows to focus any face using CUSTOM-FOCAL-FACE. You just need to set it to the face you want to focus. (You might want to discard all the other changes.) ; support for custom-focal-face insert tail second :unfocus [ if object? get/any 'custom-focal-face [custom-focal-face: none]] ; new window feel, to catch active, inactive and close. ; update: catch keys too, but without interfering with focused faces; ; also, now the whole event is passed to window/action ; update: now ESC unfocuses, too ; update: custom-focal-face added system/view/window-feel: make system/view/window-feel [ detect: func [face event /local f] [ either event/type = 'key [ either all [system/view/focal-face in-window? face system/view/focal-face] [ if event/key = #"^(1B)" [ unfocus] event ] [ either all [object? get/any 'custom-focal-face in-window? face custom-focal-face] [ custom-focal-face/feel/engage custom-focal-face 'key event none ] [ do-face face event either f: find-key-face face event/key [ do-face f event none ] [ event] ] ] ] [ if find [close active inactive] event/type [ do-face face event] event ] ] ] Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: