Fixes issues 3883 and 5194
diff --git a/Lib/idlelib/keybindingDialog.py b/Lib/idlelib/keybindingDialog.py
index 1ce7ff4..d6d1f18 100644
--- a/Lib/idlelib/keybindingDialog.py
+++ b/Lib/idlelib/keybindingDialog.py
@@ -132,8 +132,8 @@
         order is also important: key binding equality depends on it, so
         config-keys.def must use the same ordering.
         """
-        import sys
-        if sys.platform == 'darwin' and sys.argv[0].count('.app'):
+        import macosxSupport
+        if macosxSupport.runningAsOSXApp():
             self.modifiers = ['Shift', 'Control', 'Option', 'Command']
         else:
             self.modifiers = ['Control', 'Alt', 'Shift']