MCPcopy
hub / github.com/gdamore/tcell / KeyToUTF

Method KeyToUTF

vt/layout.go:303–316  ·  view source on GitHub ↗
(k Key, m Modifier)

Source from the content-addressed store, hash-verified

301}
302
303func (km *Layout) KeyToUTF(k Key, m Modifier) rune {
304 for _, mm := range km.Maps {
305 if mm.When != nil && !mm.When(m) {
306 continue
307 }
308 if u, ok := mm.Map[k]; ok {
309 return u
310 }
311 }
312 if km.Base != nil {
313 return km.Base.KeyToUTF(k, m)
314 }
315 return 0
316}
317
318// KeysUsLower is a list of lower case key maps.
319var KeysUsLower = map[Key]rune{

Callers 2

PressedMethod · 0.80
ReleasedMethod · 0.80

Calls 1

WhenMethod · 0.65

Tested by

no test coverage detected