langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
14
Task/Keyboard-macros/Oz/keyboard-macros.oz
Normal file
14
Task/Keyboard-macros/Oz/keyboard-macros.oz
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
declare
|
||||
[QTk] = {Module.link ['x-oz://system/wp/QTk.ozf']}
|
||||
Label
|
||||
Window = {QTk.build td(label(text:"Hello" handle:Label))}
|
||||
in
|
||||
{Window bind(event:"<Control-x><Control-s>"
|
||||
action:proc {$}
|
||||
{Label set(text:"This is not Emacs.")}
|
||||
end
|
||||
)}
|
||||
{Window bind(event:"<Control-x><Control-c>"
|
||||
action:toplevel#close
|
||||
)}
|
||||
{Window show}
|
||||
26
Task/Keyboard-macros/PureBasic/keyboard-macros.purebasic
Normal file
26
Task/Keyboard-macros/PureBasic/keyboard-macros.purebasic
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#Win = 0
|
||||
#Demo1 = 0
|
||||
#Demo2 = 1
|
||||
|
||||
If OpenWindow(#Win,50,50,200,60,"PureBasic",#PB_Window_SystemMenu)
|
||||
;
|
||||
AddKeyboardShortcut(#Win,#PB_Shortcut_F1, #Demo1)
|
||||
AddKeyboardShortcut(#Win,#PB_Shortcut_F|#PB_Shortcut_Alt, #Demo2)
|
||||
;
|
||||
Repeat
|
||||
WEvent = WaitWindowEvent()
|
||||
Select WEvent
|
||||
Case #PB_Event_Menu
|
||||
Select EventMenu()
|
||||
Case #Demo1
|
||||
MessageRequester("Info", "You Pressed F1")
|
||||
|
||||
Case #Demo2
|
||||
MessageRequester("Info", "You Pressed Alt-F")
|
||||
|
||||
EndSelect
|
||||
Case #PB_Event_CloseWindow
|
||||
Break
|
||||
EndSelect
|
||||
ForEver
|
||||
EndIf
|
||||
30
Task/Keyboard-macros/REBOL/keyboard-macros.rebol
Normal file
30
Task/Keyboard-macros/REBOL/keyboard-macros.rebol
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
REBOL [
|
||||
Title: "Keyboard Macros"
|
||||
Date: 2009-12-14
|
||||
Author: oofoe
|
||||
URL: http://rosettacode.org/wiki/Keyboard_macros
|
||||
]
|
||||
|
||||
; Application specific keyboard bindings using REBOL VID
|
||||
; dialect. Implementation of the "Averageman" calculator --
|
||||
; See http://www.atariarchives.org/bcc2/showpage.php?page=63 for details.
|
||||
|
||||
view layout [
|
||||
style btn button coal 46
|
||||
across
|
||||
|
||||
display: h1 100 red maroon right "" return
|
||||
|
||||
; Key shortcuts are specified as character arguments to widget
|
||||
; descriptions in the layout.
|
||||
|
||||
btn "1" #"1" [set-face display "1"]
|
||||
btn "+" #"+" [set-face display ""]
|
||||
return
|
||||
|
||||
pad 54
|
||||
btn "=" #"=" [set-face display "3"]
|
||||
|
||||
pad 1x100 return
|
||||
text "(c) 1977 G. Beker"
|
||||
]
|
||||
3
Task/Keyboard-macros/Retro/keyboard-macros-1.retro
Normal file
3
Task/Keyboard-macros/Retro/keyboard-macros-1.retro
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[ default: getc
|
||||
[ '~ = ] [ drop clear 0 ] when
|
||||
] is getc
|
||||
1
Task/Keyboard-macros/Retro/keyboard-macros-2.retro
Normal file
1
Task/Keyboard-macros/Retro/keyboard-macros-2.retro
Normal file
|
|
@ -0,0 +1 @@
|
|||
devector getc
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
// Configure a key to access menu item.
|
||||
// The menu item may then contain the commands directly, or it may call a macro from disk.
|
||||
// This has the advantage that the key binding is shown in the menu.
|
||||
Key_Add("Shft-F6","[MENU]TV", OK)
|
||||
|
||||
// Configure a key to perform visual mode edit operations (similar to recorded key macro):
|
||||
Key_Add("Numpad.Enter", "[CURSOR LEFT][LINE END][RETURN]", OK)
|
||||
|
||||
// Configure a key to execute macro language commands:
|
||||
Key_Add("Numpad+", '[VISUAL EXIT] if(BB!=-1) { RCB(10,BB,BE) BB(-1) S("|@(10)",SET+CONFIRM) } else { S("",CONFIRM) }', OK)
|
||||
|
||||
// Configure a key to call a macro from disk. The old key assignment is not removed.
|
||||
Key_Add("Ctrl-Shft-N",'[VISUAL EXIT] Call_File(100,"aspell.vdm","NEXT_ERROR")',INSERT+OK)
|
||||
|
||||
// Configure a two-key sequence (C-x C-c to save file).
|
||||
Key_Add("^X C","[MENU]FS", OK)
|
||||
|
||||
// Remove a key assignment. If INSERT option was used when the key was assigned, the old assignment will come in effect again.
|
||||
Key_Delete("Ctrl-Shft-N")
|
||||
Loading…
Add table
Add a link
Reference in a new issue