NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 20 21 22 23 24 … 93 Next »
How to handle the NMT keyboard

 
  • 0 Vote(s) - 0 Average
How to handle the NMT keyboard
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,104
Threads: 957
Joined: May 2006
#1
2010-01-21, 05:54 AM
I'm trying to get ML3 to respond to the NMT keyboard the way Bekken did in Music and Sub does on the Recording Seach but I can't see it in my OnKeyDown events. Do I have to define OnKeyPress an fake something? I can't get OnKeyPress on IMenuTask with this definition

public bool OnKeyPress(System.Windows.Forms.KeyPressEventArgs e)
{
System.Diagnostics.Debug.WriteLine("press");
return false;
}

Any suggestions.

Martin
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,104
Threads: 957
Joined: May 2006
#2
2010-01-21, 06:13 AM
I struggled with this for 1/2 an hour make this post and wouldn't you know by clicking on enough things in Visual C# Express I find that it is in

IExtendedKeyProcessing not IMenuTask

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#3
2010-01-21, 02:45 PM
Yep, the key is the plugin needs to implement the IExtendedKeyProcessing interface.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,104
Threads: 957
Joined: May 2006
#4
2010-01-22, 12:39 AM (This post was last modified: 2010-01-22, 01:11 AM by mvallevand.)
I'm not sure if this is an acceptable hack or not but this is how I've implemented it in ML3

Code:
public bool OnKeyPress(System.Windows.Forms.KeyPressEventArgs e)
        {
            if (yourPluginLogicNMT == true)
            {
                int myKey = Convert.ToInt32(e.KeyChar & 0x5f);
                if (myKey >= 65 && myKey <= 90)
                    this.OnKeyDown(new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys)myKey));
            }
            return false;
        }

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  ShowSearch Request (OnScreen Keyboard) mugun 3 1,860 2007-02-22, 05:42 AM
Last Post: JavaWiz
  render only called for mouse and keyboard event rshaw 24 6,756 2006-09-20, 10:45 AM
Last Post: 23skidoo
  Fast Find - Keyboard Design Question Dubya 10 3,482 2005-03-14, 08:48 PM
Last Post: Jeff
  OnScreen Keyboard reven 5 3,027 2004-12-14, 01:07 AM
Last Post: reven
  On Screen Keyboard borgs5 3 2,184 2004-12-06, 07:38 PM
Last Post: reven
  Virtual keyboard Dai 7 3,997 2004-04-22, 06:00 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode