Linux system
Code: Select all
EditorGadget(#EDITOR,1,2, Window_Width, Window_Height)
Code: Select all
EditorGadget(#EDITOR,1,2, Window_Width, Window_Height)
Code: Select all
Enumeration Key_Shortcuts
#EnterKey
EndEnumeration
Window_0 = OpenWindow(#PB_Any, #PB_Ignore, #PB_Ignore, 410, 300, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
Text_0 = TextGadget(#PB_Any, 30, 25, 240, 30, "Test - Press Enter")
Editor_0 = EditorGadget(#PB_Any, 30, 55, 350, 200)
AddKeyboardShortcut(Window_0, #PB_Shortcut_Return, #EnterKey) ; Keyboard shortcut standalone (without menu item)
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_CloseWindow
Break
Case #PB_Event_Menu ; Dummy menu to allow ENTER key as 'default'
Select EventMenu()
Case #EnterKey
SetGadgetText(Text_0, "Enter key pressed")
EndSelect
Case #PB_Event_Gadget
EndSelect
ForEver