Class: MPV::Client::KeyEvent
- Inherits:
-
Struct
- Object
- Struct
- MPV::Client::KeyEvent
- Defined in:
- lib/mpv_ipc/client.rb
Instance Method Summary collapse
- #down? ⇒ Boolean
- #hit? ⇒ Boolean
- #hold? ⇒ Boolean
- #press? ⇒ Boolean
- #repeat? ⇒ Boolean
- #up? ⇒ Boolean
Instance Method Details
#down? ⇒ Boolean
423 424 425 |
# File 'lib/mpv_ipc/client.rb', line 423 def down? state == "d-" end |
#hit? ⇒ Boolean
426 427 428 |
# File 'lib/mpv_ipc/client.rb', line 426 def hit? state == "p-" end |
#hold? ⇒ Boolean
435 436 437 |
# File 'lib/mpv_ipc/client.rb', line 435 def hold? press? or repeat? end |
#press? ⇒ Boolean
432 433 434 |
# File 'lib/mpv_ipc/client.rb', line 432 def press? hit? or down? end |
#repeat? ⇒ Boolean
429 430 431 |
# File 'lib/mpv_ipc/client.rb', line 429 def repeat? state == "r-" end |
#up? ⇒ Boolean
420 421 422 |
# File 'lib/mpv_ipc/client.rb', line 420 def up? state == "u-" end |