In a Custom Menus environment, the keyboard shortcut Option+f (Mac) or Alt+F4 (Win) allows you to go from the Custom Menus mode to 4D's built-in User Mode.
If you do not want to allow your users into User Mode, here are some solutions that can help you to avoid this:
Use the ON EVENT CALL command to trap this shortcut. This command must be used carefully.
Define a default output form for table one (#1) that contains the command QUIT 4D in its Form method.
Use the 4D password system. If you assign a project method (even an empty one) to a user, they will not be able to get into the User Mode. Instead, 4D will quit.
A nice feature since 4D v6.5 is the default user setting in the Data Access tab of the Database Properties dialog. After defining a default user, 4D will not request a password when launching the database and will automatically log into it with the default privileges. If you also assign an empty method to the default user in the Password editor, you will prevent them from getting out of the Custom Menus mode.
Passwords - DEFAULT USER
Group Access to the User Mode