shiftSelect sets the selection start if the shift key is down but wasn't previously. If the shift key has been released, the selection info is cleared.
(e events.Event)
| 893 | // shiftSelect sets the selection start if the shift key is down but wasn't previously. |
| 894 | // If the shift key has been released, the selection info is cleared. |
| 895 | func (tf *TextField) shiftSelect(e events.Event) { |
| 896 | hasShift := e.HasAnyModifier(key.Shift) |
| 897 | if hasShift && !tf.selectMode { |
| 898 | tf.selectModeToggle() |
| 899 | } |
| 900 | if !hasShift && tf.selectMode { |
| 901 | tf.selectReset() |
| 902 | } |
| 903 | } |
| 904 | |
| 905 | // selectRegionUpdate updates current select region based on given cursor position |
| 906 | // relative to SelectStart position |
no test coverage detected