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

Enter Key

 [1/6] from: ammoncooke::yahoo::com at: 1-Sep-2001 9:08


Hi, Does anyone know the string for the enter key? Thanks! Ammon

 [2/6] from: sanghabum:aol at: 1-Sep-2001 12:56


[ammoncooke--yahoo--com] Hi Ammon
> Does anyone know the string for the enter key? >
#"^M" Use this code to find string for any other key: Insert-event-func [ print [event/type " " mold event/key] return event] unview/all view/new layout [button "Halt" [Halt]] do-events --Colin

 [3/6] from: greggirwin:starband at: 1-Sep-2001 11:19


Hi Ammon, << Does anyone know the string for the enter key? >> It looks like #"^M". I found this out by using a snippet Allen Kamp wrote that is in a View doc from CodeConscious. REBOL [] key-event: func [face event] [ if event/type = 'key [ print mold event/key ] event ] insert-event-func :key-event view layout [ text {Type and see the char or keycode printed in console} button "Remove Event & Close" 200 [ remove-event-func :key-event unview/all ] ] Great stuff Allen! Thanks! --Gregg

 [4/6] from: ammoncooke::yahoo at: 1-Sep-2001 11:51


Thanks!! I will put this in my 'bag of tricks' Ammon

 [5/6] from: allenk:powerup:au at: 2-Sep-2001 11:27


> Great stuff Allen! Thanks! > > --Gregg
Thanks Gregg, I added a slightly more informative one to the FAQ at http://www.rebolforces.com/view-faq.html#sect3.4. It also tells the state of the shift and control keys. Cheers, Allen K

 [6/6] from: greggirwin:starband at: 1-Sep-2001 20:36


Allen, << I added a slightly more informative one to the FAQ at http://www.rebolforces.com/view-faq.html#sect3.4. It also tells the state of the shift and control keys. >> Thanks! Your example of how to trap the close-window event is great too, and prompted a question in my mind somewhat related to the recent discussion on REBOL docs here. I use probe, source, easy-VID, Word Browser, etc. but I haven't seen anything that talks about all the events that may come in for feel (e.g. up over away) or that may be used with insert-event-func. Is there a good way to mine that information? --Gregg