14 Replies Latest reply on Jan 6, 2017 7:53 AM by William-Porter

    Delete record from keyboard

    ksinger

      When I delete a record and the delete dialog box comes up, the default choice is the cancel button.  Can I change the default choice to the delete button?  Or what is the keyboard shortcut to move the selection to the delete button?  I'm using Sierra and Filemaker 15. 

       

      Thanks

        • 1. Re: Delete record from keyboard
          philmodjunk

          If you have FileMaker Advanced, you can replace the standard delete record menu option with a script of your own design. In that script, you can use Show Custom Dialog to display the delete confirmation message and then the choice of which button is the default is totally in your control. But note the number of extra steps required to get that control. It's not worth doing that in my opinion and having "cancel" as the default is a safer UI design feature anyway.

          1 of 1 people found this helpful
          • 2. Re: Delete record from keyboard
            Jade

            Press the "tab" key.  That selects the "Delete" button.  Then press the space bar to delete the record.

            1 of 1 people found this helpful
            • 3. Re: Delete record from keyboard
              ksinger

              You're right, it's better to be safe than sorry since there is no going back. 

              • 4. Re: Delete record from keyboard
                ksinger

                Thank you, thank you, thank you.  I tried a bunch of different key combinations but didn't think about tabbing.  And I never would have guessed that you need to hit space (not return) to finish.

                • 5. Re: Delete record from keyboard
                  rjmanns

                  Hello ksinger,

                   

                  I normally use Ctrl-E and then press D to do quick record deletes.  I am on Window, so don't know if that applies to Mac system as well.

                   

                  Rick

                  • 6. Re: Delete record from keyboard
                    William-Porter

                    I see that question has been marked answered. But I'm mystified. I don't think the answer is correct.

                     

                    On Windows, yes, typing 'delete' key, then tab, then spacebar might work. I'm not on a Windows machine and can't test but that sounds plausible.

                     

                    But on macOS Sierra, at least with the default FileMaker menu settings and at least on my MacBook Pro:

                    • Hitting 'delete' key won't trigger the delete record command. At least for me it brings up dialog telling me to click into a field before typing.
                    • And even if I type Cmd-E (default keyboard shortcut for delete in FileMaker for last quarter of a century), you can't use tab in macOS to move between buttons in a dialog.

                     

                    Is anybody else here on a Mac actually able to trigger 'delete record' command by hitting 'delete' key on keyboard, or to switch buttons in a default FileMaker dialog by typing tab? I'd be surprised to learn that.

                     

                    I'd say that the correct answers would be, either philmodjunk's answer (redo the dialog in FileMaker Advanced and make Delete the default button) or EVEN BETTER: using FileMaker Advanced, roll your own dialog from scratch, not using the Show Custom Dialog step but rather, creating a specially designed layout, putting buttons on the layout and adding them to the tab order for objects, and then opening that laying as a new window of the dialog type (modal or not, as you like). THEN you can tab to a button.

                     

                    Will

                    • 7. Re: Delete record from keyboard
                      phil-hanson

                      If it's not a high risk thing to delete a record here, use a button to delete record, and check the "perform without dialogue" button.

                      Gone in one click. Fast, but dangerous if deleting a record by mistake creates a big problem.

                       

                      Depends on your solution really.

                      • 8. Re: Delete record from keyboard
                        philmodjunk

                        I don't think you need to create your own dialog window/layout if all you want is to be able to press enter to click "OK" and thus delete the record. You don't have to set up a tab order for that when setting up a custom dialog.

                         

                        I'm doing much fewer "windows as dialog box" widgets these days. Usually, it's much simpler to use a popover for the same purpose.

                        • 9. Re: Delete record from keyboard
                          BruceRobertson

                          Don't forget that command-option-E does an immediate (no dialog) delete on FileMaker/Mac.

                          1 of 1 people found this helpful
                          • 10. Re: Delete record from keyboard
                            ksinger

                            My original question was what to do after the dialog box shows up.  Yes, you do have to Com-E to get to the dialog box.  Jade was saying to move from the cancel choice to the delete choice in the dialog box you tab, then space to delete the record.  So the full sequence would be

                             

                            Com-E

                            Tab

                            Space

                             

                            Unfortunately  I don't have Filemaker Advanced. 

                            • 11. Re: Delete record from keyboard
                              William-Porter

                              ksinger wrote:

                               

                              My original question was what to do after the dialog box shows up. Yes, you do have to Com-E to get to the dialog box. Jade was saying to move from the cancel choice to the delete choice in the dialog box you tab, then space to delete the record. So the full sequence would be

                               

                              Com-E

                              Tab

                              Space

                               

                              Unfortunately I don't have Filemaker Advanced.

                               

                              Have you tried using tab to switch buttons? Does it work for you on a Mac running macOS Sierra?

                               

                              It does not matter whether you have FileMaker Pro Advanced or not. On a Mac, you cannot move from one button to another in a standard FileMaker dialog (or for that matter a standard modal dialog in just about any program) using the tab key.

                               

                              There used to be apps like QuicKeys that added keyboard shortcuts to all sorts of areas of the Mac OS but I haven't used QuicKeys for years. I am pretty sure there are other utilities out there that make this possible, but I don't know about them and in any case they are system mods. I looked in the macOS Sierra Accessibility Options in Preferences where I kind of expected to find a way to make this possible, but I didn't see it.

                               

                              If you plan to delete a lot of records, either

                              • Use the option-cmd-E shortcut that Bruce Robertson mentioned — but be careful!
                              • Write a script that tosses up a confirmation dialog that offers 'Delete' as the default button. You don't need FileMaker Advanced to do this!
                              • Create your own dialog from scratch and put the buttons into the tab order as I suggested earlier. Don't need FileMaker Advanced for this either but it's more work than probably makes sense for this particular task.

                               

                              Anyway, with the default FileMaker dialog called by Cmd-E (or Records > Delete Record), on a Mac you MUST click on the Delete button using the pointing/clicking device (trackpad, mouse, whatever). Really, this is not a FileMaker issue. It's not a delete-records issue. It's a macOS issue.

                               

                              Will

                              • 12. Re: Delete record from keyboard
                                Jade

                                Hi Will,

                                 

                                Take a look at your system preferences setting for "Keyboard".  Check "All controls" at the bottom of the "Shortcuts" tab. (Alternatively, press ctrl-F7 to toggle the setting.)

                                Screen Shot 2017-01-06 at 07.37.49.png

                                • 13. Re: Delete record from keyboard
                                  beverly

                                  correct. that takes care to 'tabbing' to the next button.

                                   

                                  Williams statement (post 6):

                                  Hitting 'delete' key won't trigger the delete record command. At least for me it brings up dialog telling me to click into a field before typing.

                                   

                                  is still true. The dialog says:

                                  Before typing, press Tab or click in a field, or choose the New Record menu command.

                                  (after just hitting the delete key and not being in any field or button)

                                  beverly

                                  • 14. Re: Delete record from keyboard
                                    William-Porter

                                    Outstanding, Jade. Thanks for clueing me in on this. I have tons of

                                    keyboard shortcuts defined in that system prefs dialog but I never noticed

                                    those options at the bottom of the dialog. Exactly what I was looking for

                                    earlier in the Accessibility settings.

                                     

                                    I'm pretty sure what I said earlier is still correct *on a default macOS

                                    computer*. So the answer "tab to the button and then hit spacebar" is not

                                    completely correct until you add what Jade has pointed out — that you have

                                    to set your system preferences up to allow this.

                                     

                                    Will