(s string, mod tcell.ModMask)
| 145 | } |
| 146 | |
| 147 | func addKeyModifier(s string, mod tcell.ModMask) string { |
| 148 | if reModKey.MatchString(s) { |
| 149 | return s |
| 150 | } |
| 151 | |
| 152 | switch { |
| 153 | case mod&tcell.ModCtrl != 0: |
| 154 | return wrapModifier(s, "c") |
| 155 | case mod&tcell.ModShift != 0: |
| 156 | return wrapModifier(s, "s") |
| 157 | case mod&tcell.ModAlt != 0: |
| 158 | return wrapModifier(s, "a") |
| 159 | default: |
| 160 | return s |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | func readKey(ev *tcell.EventKey) string { |
| 165 | var s string |
no test coverage detected