Inheritance: InputEvent
        public override bool onKeyDown(int keyCode, KeyEvent e)
        {
            // http://android-coding.blogspot.com/2011/08/handle-back-button-in-webview-to-back.html

            if (keyCode == KeyEvent.KEYCODE_BACK)
            {
                if (webview.canGoBack())
                {
                    webview.goBack();
                    return true;
                }
            }
            return base.onKeyDown(keyCode, e);
        }
Example #2
0
 public override bool onKeyDown(int arg0, KeyEvent arg1)
 {
     if (arg0 == KeyEvent.KEYCODE_DPAD_LEFT || arg0 == KeyEvent.KEYCODE_DPAD_RIGHT || arg0 == KeyEvent.KEYCODE_DPAD_UP || arg0 == KeyEvent.KEYCODE_DPAD_DOWN)
     {
         FireBullet();
         return true;
     }
     if (arg0 == KeyEvent.KEYCODE_DPAD_CENTER)
     {
         FireSpray();
         return true;
     }
     return base.onKeyDown(arg0, arg1);
 }
Example #3
0
        public override bool dispatchKeyEvent(KeyEvent @event)
        {
            if (mContext.onKeyEvent(id, this, @event))
            {
                //Log.d(TAG, "Window " + id + " key event " + @event
                //        + " cancelled by implementation.");
                return false;
            }

            if (@event.getAction() == KeyEvent.ACTION_UP)
            {
                if (@event.getKeyCode() == KeyEvent.KEYCODE_BACK)
                {
                    mContext.unfocus(this);
                    return true;
                }
            }

            return base.dispatchKeyEvent(@event);
        }
Example #4
0
		void SendKeyEvent (KeyEvent e)
		{
			XobotActivityManager.Invoke ((window) => window.SendKeyEvent (e));
		}
Example #5
0
        public virtual bool dispatchKeyEvent(KeyEvent @event)
        {
            throw null;

        }
        public override bool dispatchKeyEvent(KeyEvent @event)
        {


            return ondispatchKeyEvent(@event);
        }
Example #7
0
		internal void SendKeyEvent (KeyEvent e)
		{
			getCallback ().dispatchKeyEvent (e);
		}
Example #8
0
		public override bool isShortcutKey (int keyCode, KeyEvent @event)
		{
			throw new NotImplementedException ();
		}
Example #9
0
		public override bool superDispatchKeyShortcutEvent (KeyEvent @event)
		{
			throw new NotImplementedException ();
		}
Example #10
0
		public override bool performPanelShortcut (int featureId, int keyCode, KeyEvent @event, int flags)
		{
			throw new NotImplementedException ();
		}
Example #11
0
		public override void togglePanel (int featureId, KeyEvent @event)
		{
			throw new NotImplementedException ();
		}
Example #12
0
		public override bool superDispatchKeyEvent (KeyEvent @event)
		{
			return view.dispatchKeyEvent (@event);
		}
Example #13
0
 public virtual bool onKeyDown(int keyCode, KeyEvent @event)
 {
     return default(bool);
 }
        public override bool onKeyDown(int keyCode, KeyEvent e)
        {
            // http://android-coding.blogspot.com/2011/08/handle-back-button-in-webview-to-back.html

            if (AtKeyDown != null)
                if (AtKeyDown(keyCode, e))
                    return true;

            return base.onKeyDown(keyCode, e);
        }
Example #15
0
File: View.cs Project: wclwksn/code
 public virtual bool dispatchKeyEvent(KeyEvent @event)
 {
     throw null;
 }
 public virtual bool onKeyEvent(int arg0, XWindow arg1, KeyEvent arg2)
 {
     return false;
 }