|
Last change
on this file was
215,
checked in by alex, 3 years ago
|
|
only copy dir and cst files now, when doing svn update movie binaries. added function to split path in order to not assume, that the first dot is the file extension seperator
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | -- keyboardNavigation_FrameLoop |
|---|
| 2 | ----------------------------------- |
|---|
| 3 | -- DESCRIPTION: |
|---|
| 4 | -- frame loop and keyboard input "watcher" |
|---|
| 5 | -- keyboard navigation using control+tab to access the menu without mouse |
|---|
| 6 | -- |
|---|
| 7 | -- REQUIRES: |
|---|
| 8 | -- none |
|---|
| 9 | -- |
|---|
| 10 | -- USAGE: |
|---|
| 11 | -- put this behavior on a framescript in order to loop on that frame |
|---|
| 12 | -- and track whether the user presses ctrl + TAB |
|---|
| 13 | -- Currently it is set to track the whole time, therefore the menus even appear |
|---|
| 14 | -- if the app is not in foreground. |
|---|
| 15 | -- A deactivate application trigger could change that. I am ok with it myself |
|---|
| 16 | -- and I even sometimes look up items, when I am in other apps like bbedit... |
|---|
| 17 | ----------------------------------- |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | property pActive |
|---|
| 22 | |
|---|
| 23 | on exitFrame me |
|---|
| 24 | |
|---|
| 25 | ----------------------- keyboardcontrol: |
|---|
| 26 | if the controldown then |
|---|
| 27 | if not(pActive) then |
|---|
| 28 | |
|---|
| 29 | if keypressed(48) then -- TAB key |
|---|
| 30 | if the shiftdown then -- CTRL + SHIFT + TAB open handler menu |
|---|
| 31 | sendSprite(xscr().mGetKanal(#handlerMenuTrigger), #mousedown) |
|---|
| 32 | else -- CTRL + TAB open utitlities menu |
|---|
| 33 | sendSprite(xscr().mGetKanal(#utilitiesMenuTrigger), #mousedown) |
|---|
| 34 | end if |
|---|
| 35 | pActive = 1 |
|---|
| 36 | end if |
|---|
| 37 | |
|---|
| 38 | end if |
|---|
| 39 | else |
|---|
| 40 | pActive = 0 |
|---|
| 41 | end if |
|---|
| 42 | ----------------------- // keyboardcontrol |
|---|
| 43 | |
|---|
| 44 | go the frame |
|---|
| 45 | end |
|---|
Note: See
TracBrowser
for help on using the repository browser.