14 Replies Latest reply on May 6, 2014 4:10 AM by dsr1

    Keyboard Short Cuts


      Hi All,


      I can't see any way to get custom keyboard shortcuts without using custom pull down menus.


      The app I am working on has no pull down menu.


      Now, for most users this will not be an issue, but my power users (often touch typists) will want a set to use.


      Is there a way I can create a set that can be accessed without custom menus?





        • 1. Re: Keyboard Short Cuts

          Alternatively, you can use a layout script trigger (OnLayoutKeystroke) paired with a few functions: Get(TriggerKeystroke), and Get(ActiveModifierKeys). The triggered script can "override" the action, (IE Ctrl + F) with it's own commands.


          Say for instance you wanted to trigger Ctrl + F to go to another layout in find mode, your OnLayoutKeystroke script would look something like this:


          If [ Get(TriggerKeystroke) = "f" and Get(ActiveModifierKeys) = "4" ]

             Enter Find Mode

             Go To Layout ( Your Find Mode Layout )

          End If


          You could then script numerous statements in your trigger script for all the custom shortcuts you wanted to process.

          • 2. Re: Keyboard Short Cuts

            Mike,  I don't think this will work because the script will only trigger when you are actively in a field typing a character in the field. So if you type Ctrl + "f", the "f" never gets recognized since Ctrl + "f" is different than "f".

            • 3. Re: Keyboard Short Cuts

              What makes you say that?

              • 4. Re: Keyboard Short Cuts

                Roy is right, it doesn’t work the way I wrote it, at least for windows (ctrl+f would work on a mac). I need to stop posting before I have any coffee! Also I’m on a mac, so I’m losing touch with my memory of how certain things evaluate on windows.


                command + F will not trigger the script trigger (mac), but ctrl + f will, because ctrl is not the standard modifier on mac.


                One caveat about creating your short keys ( that I now recollect ) is that you have to use key combinations that are not already assigned to use by menu items. So command/ctrl + F would not work unless you removed enter find mode from your menu set.


                Sorry for the confusion.

                • 5. Re: Keyboard Short Cuts

                  Bruce, I copied the script to a file on my Mac.  The script did not work.  You can trap for the modifier key but Get(TriggerKeystroke) would not capture the "f".  If you use the data viewer and type Ctrl + f , nothing shows for Get(TriggerKeystroke).  The one thing that I didn't do is disable all of the menus.  Not sure if this would make a difference.


                  Message was edited by: rgordon I reread my earlier post and mistated about the script only triggering when you are in a field.  That is not correct.  It will trigger if you are not in a field but Ctrl + f will not create a f character.

                  • 6. Re: Keyboard Short Cuts

                    My comment was a response to the not-in-field part.


                    I tested it also and I see some modifier keys allow capture of the character but some do not.


                    Option works. But not command or control.

                    • 7. Re: Keyboard Short Cuts

                      Option + f will work because it creates the character ,ƒ, so if you used this script


                      If [ Get(TriggerKeystroke) = "ƒ" and Get(ActiveModifierKeys) = "8" ]

                         Enter Find Mode

                         Go To Layout ( Your Find Mode Layout )

                      End If


                      It will work but if your cursor is in a field it will also type a ƒ in the active field.  You would need to add something that would then remove the ƒ. 

                      • 8. Re: Keyboard Short Cuts

                        What is the reason for not using custom menus?

                        1 of 1 people found this helpful
                        • 9. Re: Keyboard Short Cuts

                          Funny you should mention that Fitch. I find myself asking the same question.


                          This has been a long project and I am in the delightful position of having a completely free hand to create whatever I want without any legacy handcuffs.


                          The decision not to use pull down menus was based mainly on (my perceived) restrictions of IWP and my incorrect assumption that I could better use the screen height taken up by the menu bar. I do not need pull downs for navigation or for any functions except keyboard shortcuts.


                          It might be time to review that desision.

                          • 10. Re: Keyboard Short Cuts

                            IWP is a whole different ball game. Custom menus won't work, nor will script triggers. Custom keyboard shortcuts in IWP? No.

                            • 11. Re: Keyboard Short Cuts

                              IWP is also going to eventually reach end of life since it’s no longer developed, so you’ll want to start being proactive about that as well.

                              • 12. Re: Keyboard Short Cuts

                                Hello Peter,


                                I'd like to ask you to clarify/confirm/refute that you really meant to say IWP, and not WebDirect in your last post.


                                I ask this, because reading between the lines of your posts more implies to me that you are working with WebDirect, not IWP:


                                   - Mentioning saving screen real estate by removing a menu bar (IWP has no menu bar)


                                   - Concern regarding whether Custom Menu sets work (apt question for WebDirect, whereas, again, IWP has no menu bar at all)


                                Perhaps you could post a reply to clarify?  Since there is such a dramatic difference between these two technologies, making sure that we are all on the same page will help everyone respond with relevant information.


                                Thanks and sincere/best regards,



                                1 of 1 people found this helpful
                                • 13. Re: Keyboard Short Cuts

                                  Hi Fitch,




                                  I once wrote a pair of custom functions that enabled custom keystroke shortcuts for IWP.  It seemed to work fine.


                                  I did this because I learned of a case where visually impaired users were grappling with an IWP interface, and having custom keystroke shortcuts could have potentially made a big difference.  As far as I know, they never utilized the solution, thus it is likely that no one ever implemented custom keystroke shortcuts with IWP, but it actually was possible.





                                  • 14. Re: Keyboard Short Cuts

                                    Thanks Steve,


                                    The app I am working on is pretty large, about 80 layouts interface with the user.


                                    I am yet to get it to a stage where I can consider it "runtime". I have not used IWP and have not even fired up my copy of server. This will be happening very soon, in a few weeks .... all going well.


                                    My reference to IWP was merely my perception based only on what I had read about the product. Naturally WD is a whole new game and looks like it will be fantastic. Hopefully my more complex layouts are not too object and function intensive to get acceptable performance. I will find out soon enough.


                                    Having discounted the pull down menu when designing for IWP I had not really considered using it under WD untill now.


                                    Fitch realy hit the nail on the head with his "Why Not" suggestion. There is nothing to gain (and some to lose) by not having it now.


                                    Thanks again for your help. I am very much enjoying Filemaker and this community