"... you mean these fans?" Posted October 3, 2014 Posted October 3, 2014 Hi, Questions. I have a customer that want to close the current window using the command key and some other letter key. I know the "Command Key" and "W" closes the app. And I will need advise the customer on certain keys. However the issue is I can not see the "Command Key" when using the "get ( ActiveModiefierKeys ) I can see the "Shift" key as 1 but I can not see the "command" key as 16 ( mac ) according to "Filemaker's" Get(ActiveModifierKeys) instruction page. I've pasted the entire thing, so can someone please explain why I can not get the 16 in my message box Message box: "Modifier Key :"&Get(ActiveModifierkeys) "Key : "&Get(TriggerKeystroke) The above message box will display 1 and z if I hold down the "Shift" and select the "z" key. However, if I hold down the "command" key ( mac ) and select the letter "z" nothing happens. Can some please explain why. Format Get(ActiveModifierKeys) Parameters None Data type returned number Originated in FileMaker Pro 6.0 or earlier Description The number returned is calculated by summing numbers representing each modifier key being pressed. The values assigned to the keys are: • Shift = 1 • Caps Lock = 2 • Ctrl (Windows) and Control (Mac OS) = 4 • Alt (Windows) and Option (Mac OS) = 8 • Command (Mac OS) = 16 Note For information on how functions evaluate differently on the host versus the client, search the FileMaker Knowledge Base available at www.filemaker.com/kb.
comment Posted October 3, 2014 Posted October 3, 2014 However, if I hold down the "command" key ( mac ) and select the letter "z" nothing happens. Well something does happen, because that's the shortcut for the Undo command. However, if you have a script triggered On LayoutKeystroke or OnObjectKeystroke, then pressing Command+z will not activate the trigger.
"... you mean these fans?" Posted October 4, 2014 Author Posted October 4, 2014 Comment, Thank you. I looked at the menu just to make sure too, obviously not good enough so I google this "Command" plus a "Key" thing and found that every key that could be used is being used. So I created a custom menu set. A whole lot easier that's for sure.
comment Posted October 4, 2014 Posted October 4, 2014 every key that could be used is being used. Filemaker has set aside the Command-1 through Command-0 shortcuts for the purpose of running your own scripts. However, if we step away from the declared topic of Get ( ActiveModifierKeys ) and examine the original problem: why can't you simply use the built-in Command-W shortcut? Contrary to what you say, it does not close the application; it closes the current window. If the current window is the last window of the file, then closing it will also close the file - but that will be true no matter how you close that window.
David Nelson Posted October 5, 2014 Posted October 5, 2014 Well I just did a search for caps lock and ended up here so I hope this is okay to ask. I want to remind people if caps lock is on. I would be happy using calc or trigger or whatever works best. Maybe conditional formatting? Mostly I want to tell them when they go to their data entry layout but ideally if the put caps lock on I want them to get a big red neon sign.
comment Posted October 5, 2014 Posted October 5, 2014 Determining that Caps Lock is on is easy using = Mod ( Div ( Get ( ActiveModifierKeys ) ; 2 ) ; 2 ) How and where you want to use this is not so clear. Conditional formatting would work fine, provided there is something that would refresh the screen when Caps Lock is turned on or off. Note that turning Caps Lock on/off is not a keystroke triggering event. 1
David Nelson Posted October 5, 2014 Posted October 5, 2014 Thank you Comment. This is when someone begins to type into a field I want to pop up message telling them their caps lock is on. I am not where I can try this but I will and I am sure it will work. Things from you always do.
Recommended Posts
This topic is 3701 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now