Thanks so much!
Keys
You should use AddKeyboardShortcut() to catch and process a specific key behaviour.
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
I meant something like that :
This disables Delete key ... but it will work easy only if you want to disable for all gadgets, otherwise it will not be easy to process events between shortcuts and selected gadgets.
Code: Select all
Enumeration
#Window_Main
#Gadget_Editor
EndEnumeration
WindowWidth = 640
WindowHeight = 480
If OpenWindow(#Window_Main, 0, 0, WindowWidth, WindowHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered, "MyWindow")
AddKeyboardShortcut(#Window_Main, #PB_Shortcut_Escape, #PB_Shortcut_Escape)
AddKeyboardShortcut(#Window_Main, #PB_Shortcut_Delete, #PB_Shortcut_Delete)
If CreateGadgetList(WindowID(#Window_Main))
EditorGadget(#Gadget_Editor, 10, 10, 620, 460, "")
EndIf
Quit = #False
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Quit = #True
Case #PB_Event_Menu
Select EventMenuID()
Case #PB_Shortcut_Escape
Quit = #True
Case #PB_Shortcut_Delete
MessageRequester("Warning", "Delete key is not usable here")
EndSelect
EndSelect
Until Quit
EndIf
End
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.

