From 1a245db4c93a2f9e3f0f5e96ff55b99f1ae64e24 Mon Sep 17 00:00:00 2001
From: Alexander Rose <alex.rose@rcsb.org>
Date: Tue, 29 Oct 2019 11:56:38 -0700
Subject: [PATCH] tweaked bindings formating

---
 src/mol-util/binding.ts | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/mol-util/binding.ts b/src/mol-util/binding.ts
index b8607fd22..00886c702 100644
--- a/src/mol-util/binding.ts
+++ b/src/mol-util/binding.ts
@@ -76,29 +76,29 @@ const B = ButtonsType
 function formatButtons(buttons?: ButtonsType) {
     const s: string[] = []
     if (buttons === undefined) {
-        s.push('any button')
+        s.push('any mouse button')
     } else if (buttons === 0) {
-        s.push('no button')
+        s.push('mouse hover')
     } else {
-        if (B.has(buttons, B.Flag.Primary)) s.push('left button')
-        if (B.has(buttons, B.Flag.Secondary)) s.push('right button')
-        if (B.has(buttons, B.Flag.Auxilary)) s.push('wheel/middle button')
+        if (B.has(buttons, B.Flag.Primary)) s.push('left mouse button')
+        if (B.has(buttons, B.Flag.Secondary)) s.push('right mouse button')
+        if (B.has(buttons, B.Flag.Auxilary)) s.push('wheel/middle mouse button')
         if (B.has(buttons, B.Flag.Forth)) s.push('three fingers')
     }
     return s.join(' + ')
 }
 
-function formatModifiers(modifiers?: ModifiersKeys) {
+function formatModifiers(modifiers?: ModifiersKeys, verbose?: boolean) {
     const s: string[] = []
     if (modifiers) {
-        if (modifiers.alt) s.push('alt')
-        if (modifiers.control) s.push('control')
-        if (modifiers.meta) s.push('meta/command')
-        if (modifiers.shift) s.push('shift')
+        if (modifiers.alt) s.push('alt key')
+        if (modifiers.control) s.push('control key')
+        if (modifiers.meta) s.push('meta/command key')
+        if (modifiers.shift) s.push('shift key')
 
-        if (s.length === 0) s.push('no key')
+        if (verbose && s.length === 0) s.push('no key')
     } else {
-        s.push('any key')
+        if (verbose) s.push('any key')
     }
     return s.join(' + ')
 }
\ No newline at end of file
-- 
GitLab