Skip to content

Commit

Permalink
moved nyxboard power and user button from peripheral config to keyboa…
Browse files Browse the repository at this point in the history
…rd.xml
  • Loading branch information
opdenkamp committed Jan 8, 2013
1 parent 8ac4a46 commit a4ee831
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 2 additions & 0 deletions system/keymaps/nyxboard/keyboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<f4 mod="shift">ActivateWindow(music)</f4> <!-- Green -->
<f5 mod="shift">ActivateWindow(pictures)</f5> <!-- Yellow -->
<f6 mod="shift">ActivateWindow(programs)</f6> <!-- Blue -->
<key id='61952'>ActivateWindow(shutdownmenu)</key> <!-- Power button -->
<key id='285'>ContextMenu</key> <!-- User button -->
</keyboard>
</global>
</keymap>
2 changes: 0 additions & 2 deletions system/peripherals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<setting key="enable_flip_commands" type="bool" value="1" label="36005" order="2" />
<setting key="flip_keyboard" value="XBMC.VideoLibrary.Search" label="36002" order="3" />
<setting key="flip_remote" value="Dialog.Close(virtualkeyboard)" label="36003" order="4" />
<setting key="key_user" value="" label="36004" order="5" />
<setting key="key_power" value="XBMC.ShutDown()" label="13015" order="6" />
</peripheral>

<peripheral vendor_product="2708:1001" bus="rpi" name="Raspberry Pi CEC Adapter" mapTo="cec">
Expand Down
14 changes: 0 additions & 14 deletions xbmc/peripherals/devices/PeripheralNyxboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
using namespace PERIPHERALS;
using namespace std;

#define NYBOARD_POWER_BUTTON_KEYSYM 0x9f

CPeripheralNyxboard::CPeripheralNyxboard(const PeripheralType type, const PeripheralBusType busType, const CStdString &strLocation, const CStdString &strDeviceName, int iVendorId, int iProductId) :
CPeripheralHID(type, busType, strLocation, strDeviceName, iVendorId, iProductId)
{
Expand All @@ -50,18 +48,6 @@ bool CPeripheralNyxboard::LookupSymAndUnicode(XBMC_keysym &keysym, uint8_t *key,
CLog::Log(LOGDEBUG, "%s - switched to remote side", __FUNCTION__);
strCommand = GetSettingString("flip_remote");
}
else if (keysym.sym == XBMCK_F4 && keysym.mod == XBMCKMOD_NONE)
{
/* 'user' key pressed */
CLog::Log(LOGDEBUG, "%s - 'user' key pressed", __FUNCTION__);
strCommand = GetSettingString("key_user");
}
else if (keysym.sym == NYBOARD_POWER_BUTTON_KEYSYM && keysym.mod == XBMCKMOD_NONE)
{
/* 'power' key pressed */
CLog::Log(LOGDEBUG, "%s - 'power' key pressed", __FUNCTION__);
strCommand = GetSettingString("key_power");
}

if (!strCommand.IsEmpty())
{
Expand Down

0 comments on commit a4ee831

Please sign in to comment.