Jump to content


Photo

Plugin Option to start when a remote key is pressed

plugins enigma2

  • Please log in to reply
6 replies to this topic

#1 LoveMyDish

  • Senior Member
  • 27 posts

0
Neutral

Posted 4 November 2019 - 14:53

I'm working on a plugin.  I would like to know if there is a way to tell the plugin to start when you press a particular key on your remote.  A color key for example.

 

I would like to make a plugin that will store the satellite position to the dish mover at a push of a button. 

 

I tried this thinking it might launch when you press the red button, but it does not appear to work

 

PluginDescriptor(name="myplugin", description=_("myplugin"), where = PluginDescriptor.WHERE_CHANNEL_SELECTION_RED, fnc=main)



Re: Plugin Option to start when a remote key is pressed #2 Pr2

  • PLi® Contributor
  • 6,046 posts

+256
Excellent

Posted 4 November 2019 - 19:23

Check the Hotkey option, it is installed by default. Hotkey allows you to assign what you want to nearly any key.

 

And there is even a wiki page for it:

 

https://wiki.openpli.org/Hotkey


Edited by Pr2, 4 November 2019 - 19:24.

NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: Plugin Option to start when a remote key is pressed #3 LoveMyDish

  • Senior Member
  • 27 posts

0
Neutral

Posted 5 November 2019 - 14:05

Yes, but can enigma2 systems download HotKey if they are not using OpenPli...  Is it possible to do from the Plugin solely?


Edited by LoveMyDish, 5 November 2019 - 14:06.


Re: Plugin Option to start when a remote key is pressed #4 WanWizard

  • PLi® Core member
  • 68,309 posts

+1,719
Excellent

Posted 5 November 2019 - 14:08

No, it is an integrated feature.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Plugin Option to start when a remote key is pressed #5 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 5 November 2019 - 16:35

There are images that give hotkey a different name... they took my orriginal code, but instead of simply 'forked' it they renamed the code source and also the names in the meny from Hotkey.py to ButtonSetup.py (which makes it more difficult to synchonize it between images....)


Edited by littlesat, 5 November 2019 - 16:37.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Plugin Option to start when a remote key is pressed #6 Abu Baniaz

  • PLi® Contributor
  • 2,414 posts

+61
Good

Posted 6 November 2019 - 20:15

For Vix, I believe due respects and source of code was given for your code. If not, apologies.

Surely ButtonSetup is a better name than HotKey?

As another example, Vix uses something like MBRestart.py, ATV used lots of it and named it something like MultibootImageSelector.py.

I prefer the easy to understand name.

Sent from my Moto G (5S) using Forum Fiend v1.3.3.

Re: Plugin Option to start when a remote key is pressed #7 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 6 November 2019 - 21:13

Unless there might be better names in respect keep them as is... hotkey for me is better than buttonsetup as it does not settup all buttons it only defined hotkeys in infobar mode and the epg buttons in the channel selector. Making different names only makes merged/cherry picking impossible which does not help both sides....

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users