Ape / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
711 stars 191 forks source link

how to operate Multiple key? #45

Closed Gowtham1989 closed 7 years ago

Gowtham1989 commented 7 years ago

Hi, I want to operate multiple keys (KEY_0,KEY_1,KEY_2......,) in python program.
Where those keys are mainly used ?. I'm trying those keys to open applications present on the TV. how can i achieve this?

Ape commented 7 years ago

What do you mean operate the keys? Do you want to send multiple key presses in a sequence?

Gowtham1989 commented 7 years ago

Yes

On 11 Jul 2017 8:50 p.m., "Lauri Niskanen" notifications@github.com wrote:

What do you mean operate the keys? Do you want to send multiple key presses in a sequence?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Ape/samsungctl/issues/45#issuecomment-314478810, or mute the thread https://github.com/notifications/unsubscribe-auth/AbsOoapOi9N9HXipXrkaZlaOu-hM2DZKks5sM5KvgaJpZM4OT0Vb .

Ape commented 7 years ago

You can call control multiple times:

with samsungctl.Remote(config) as remote:
    remote.control("KEY_0")
    remote.control("KEY_1")
    remote.control("KEY_2")

You should probably add some sleeps between the calls because the TV cannot usually handle presses too quickly. But this depends on the model and which key presses you are using.

Gowtham1989 commented 7 years ago

OK. Thank you.

On 11 Jul 2017 8:54 p.m., "Lauri Niskanen" notifications@github.com wrote:

You can call control multiple times:

with samsungctl.Remote(config) as remote: remote.control("KEY_0") remote.control("KEY_1") remote.control("KEY_2")

You should probably add some sleeps between the calls because the TV cannot usually handle presses too quickly. But this depends on the model and which key presses you are using.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Ape/samsungctl/issues/45#issuecomment-314480145, or mute the thread https://github.com/notifications/unsubscribe-auth/AbsOob2jvCuIw9CGNBmxECMO_vmIgomLks5sM5O4gaJpZM4OT0Vb .