ChuWi Forum»Forum Chuwi Tablet Discussion Chuwi HiBox Hibox Air Mouse / Remote Control

Follow Us

Hibox Air Mouse / Remote Control

[Copy link]

antekgla|Post time:10-18-2017 00:52:36 View:392|Reply:1

Edited by antekgla at 10-19-2017 00:29

I own a Chuwi Hibox for the sole purpose of use it like a Media Center.
So my goal is use it only with the air mouse/remote control  (no keyboard).

As a Media Center my only use would be Netflix & Kodi in Windows 10.
For Netflix exist Netflix Remote Controller
its Ok for manage Netflix in the Netflix App.  Works as intended but I dont want to use it.
I choose Edge Browser over Netflix App because in the Edge Browser the cursor and Ok keys works without any remap, in the App not.
In Edge Browser OK pause/resume the video and left & right cursor REW and FF the video.
I make my home page, so in windows I only have to press Browser_home to launch Edge (and Netflix).

To map the keys of the remote you need to know what value pass that key to windows.
After some work with several programs. Here are the result:

Chuwi Remote Original keys

Chuwi Remote Original keys

The problem is what certain keys like Vol+ or Vol- is intercepted by Windows and can´t be mapped in kodi.

My solution was the following.
I make a autohotkey script to map certain keys of the remote for use in Kodi and Edge Browser.

This is my autohotkey script:
  1. #IfWinActive, ahk_class Kodi
  2. Volume_Down::r
  3. Volume_Up::f
  4. AppsKey::c
  5. #If

  6. SetTitleMatchMode, 2

  7. #If WinActive("Netflix ahk_exe ApplicationFrameHost.exe")
  8. AppsKey::Send #+{Enter}
  9. Volume_Down::PgUp
  10. Volume_Up::PgDn
  11. Browser_Home::
  12.         Process, Exist, osk.exe ; check to see if OnScreen Keyboard is running
  13.                 {
  14.                 If ! errorLevel
  15.                 {
  16.                         ;Send {Tab 4}{Enter}
  17.                         Run "osk.exe"
  18.                 }
  19.                 else
  20.                 {
  21.                         oWMI := ComObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
  22.                         NAme := "osk.exe"
  23.                         for proc in oWMI.ExecQuery("Select * from Win32_Process Where Name = '" NAme "'")
  24.                         proc.terminate()
  25.                 }
  26.                 }
  27. #If

  28. #IfWinActive  ; This puts subsequent remappings and hotkeys in effect for all windows.
Copy the Code
I try to explain this script a llittle:
The first part if for Kodi (the remap only work if the windows active is Kodi)
Vol- is remapped as r  (this is for Rew when you is watching a video)
Vol+ is remapped as f  (this is for FF when you is watching a video)
AppsKey is remapped as c (for contextual menu in Kodi)

The second part is for Netflix in Edge Browser (Netflix ahk_exe ApplicationFrameHost.exe)
Vol- is remapped as PgUp  (for easy navigation in Netflix browse)
Vol+ is remapped as PgDown  (for easy navigation in Netflix browse)
AppsKey is remapped to make Edge enter in Full Screen Mode.

this was the hard part...Searching in Netflix
..i want to navigate all with the remote control (no keyboard) but for search in Netflix you need to type your search so, my solution was:
only when you is in Netflix the Browser_home key launch the On Screen Keyboard (OSK), you can type the keys of the OSK in Air Mouse mode.
When you press Browser_home and the OSK is running the OSK would be closed.

So for search in Netflix you need to click in the search box with air mouse, press Browser_home, type your search and press Browser_home again to close the keyboard.

This script you can compile it with Ahk2Exe and make a exe file to execute at boot time.

So the Netflix part is done.
Now we need the Kodi part:
This is my keyboard.xml (you can use it or make one yourself at your own taste)
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <keymap>
  3.   <Global>
  4.     <keyboard>

  5.     </keyboard>
  6.   </Global>

  7.   <FullscreenVideo>
  8.     <keyboard>
  9.       <up mod="longpress">AudioNextLanguage</up>
  10.       <down mod="longpress">NextSubtitle</down>
  11.       <c>NextSubtitle</c>
  12.     </keyboard>
  13.   </FullscreenVideo>

  14.   <videos>
  15.     <keyboard>
  16.       <r>PageUp</r>
  17.       <f>PageDown</f>
  18.     </keyboard>
  19.   </videos>

  20.   <filebrowser>
  21.     <keyboard>
  22.       <r>PageUp</r>
  23.       <f>PageDown</f>
  24.     </keyboard>
  25.   </filebrowser>

  26.   <filemanager>
  27.     <keyboard>
  28.       <r>PageUp</r>
  29.       <f>PageDown</f>
  30.     </keyboard>
  31.   </filemanager>

  32. </keymap>
Copy the Code

This is my appcommand.xml file:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <keymap>
  3.   <global>
  4.     <appcommand>
  5.       <browser_back>Back</browser_back>
  6.       <browser_forward/>
  7.       <browser_refresh/>
  8.       <browser_stop>Stop</browser_stop>
  9.       <browser_search/>
  10.       <browser_favorites>ActivateWindow(Favourites)</browser_favorites>
  11.       <browser_home>ActivateWindow(Home)</browser_home>
  12.       <volume_mute/>
  13.       <volume_down>Rewind</volume_down>
  14.       <volume_up>FastForward</volume_up>
  15.       <next_track>SkipNext</next_track>
  16.       <prev_track>SkipPrevious</prev_track>
  17.       <stop>Stop</stop>
  18.       <play_pause>PlayPause</play_pause>
  19.       <launch_mail/>
  20.       <launch_media_select>ActivateWindow(Music)</launch_media_select>
  21.       <launch_app1>ActivateWindow(Programs)</launch_app1>
  22.       <launch_app2>ActivateWindow(Programs)</launch_app2>
  23.       <play>Play</play>
  24.       <pause>Pause</pause>
  25.       <fastforward>FastForward</fastforward>
  26.       <rewind>Rewind</rewind>
  27.       <channelup>PageUp</channelup>
  28.       <channeldown>PageDown</channeldown>
  29.     </appcommand>
  30.   </global>
  31.   <FullscreenVideo>
  32.     <appcommand>
  33.       <browser_home>PlayPause</browser_home>
  34.       </appcommand>
  35.   </FullscreenVideo>
  36. </keymap>
Copy the Code

With this two files this is the behavior of the remote in Kodi:

When you view a video (kodi fullscreenvideo window):

Vol- is Rewind (REW)
Vol+ is FastForward (FF)
Browser_home is Play/Pause
Browser_back is Back
AppsKey change the subtitle active
the cursor keys (left & right) move the timeline back and forward
the cursor keys (up & down) pressed for 2 seconds change the audio track and the subtitle.

When you are in the interface of kodi (navigating menus)
Vol- is PgUP
Vol+ is PgDown
Browser_home brings you to the main window.
AppsKey display context menu (like right click menu)
Cursor Keys & OK do the logic funcion up, down, left, right and return (select)

I hope what someone find this useful.


Use magic Report

emily| Post time 10-18-2017 00:52:36 | Show all posts
very thank you for you experience, it will help more people
Reply Support Not support

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Quick Reply To Top Return to the list