#define KEY_ENTER "Return"
#define KEY_BACK "Escape"
#define KEY_MENU "Super_L"
+#define KEY_ENTER_REMOTE "KP_Enter"
+#define KEY_BACK_REMOTE "XF86Close"
+#define KEY_MENU_REMOTE "XF86MenuKB"
#define SORT_BY_ARTIST_AZ "SORT_BY_ARTIST_AZ"
#define SORT_BY_ARTIST_ZA "SORT_BY_ARTIST_ZA"
{
switch (id) {
case ALBUM_LAYOUT:
- if (!strcmp(ev->keyname, KEY_BACK)) {
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE)) {
SParcel parcel;
parcel.ctxtInfo = NULL;
parcel.updateType = E_FOCUS_UPDATE;
SContentInfo *ctxtinfo = NULL;
SAlbumItemInfo *itinfo = NULL;
- if (strcmp(ev->keyname, KEY_MENU))
+ if (strcmp(ev->keyname, KEY_MENU) &&
+ strcmp(ev->keyname, KEY_MENU_REMOTE))
return;
it = elm_object_focused_item_get(obj);
switch (id)
{
case ALBUM_SONGS_LAYOUT:
- if (!strcmp(ev->keyname, KEY_BACK)) {
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE)) {
SParcel parcel;
parcel.ctxtInfo = NULL;
parcel.updateType = E_DEPTH_UPDATE;
SContentInfo *ctxtinfo = NULL;
SAlbumSongsItemInfo *itinfo = NULL;
- if (strcmp(ev->keyname, KEY_MENU))
+ if (strcmp(ev->keyname, KEY_MENU) &&
+ strcmp(ev->keyname, KEY_MENU_REMOTE))
return;
it = elm_object_focused_item_get(obj);
m->mhandle->Stop();
elm_exit();
}
- else if (!strcmp(ev->keyname, KEY_ENTER)) {
+ else if (!strcmp(ev->keyname, KEY_ENTER) ||
+ !strcmp(ev->keyname, KEY_ENTER_REMOTE)) {
if (elm_object_focus_get(m->c_grpbtn)) {
m_UpdateCurrentLayout(true);
}
case BASE_VIEW_PLAY_BUTTON:
case BASE_VIEW_SORT_BUTTON:
case BASE_VIEW_SOURCE_BUTTON:
- if (!strcmp(ev->keyname, KEY_BACK))
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE))
elm_object_focus_set(m->c_grpbtn, EINA_TRUE);
break;
case BASE_VIEW_GROUP_GENRE:
case BASE_VIEW_GROUP_FOLDER:
case BASE_VIEW_GROUP_PLAYLIST:
- if (!strcmp(ev->keyname, KEY_BACK)) {
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE)) {
m->mhandle->Stop();
elm_exit();
}
int count;
Eina_List *alist = NULL;
- if (!strcmp(ev->keyname, KEY_BACK)) {
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE)) {
if (t.depth == E_DEPTH_CATEGORY) {
SParcel parcel;
parcel.ctxtInfo = NULL;
if (!obj)
return;
- if (strcmp(ev->keyname, KEY_MENU) || t.depth ==
- E_DEPTH_SELECT_LIST || t.depth ==
- E_DEPTH_SHOW_LIST)
+ if ((strcmp(ev->keyname, KEY_MENU) &&
+ strcmp(ev->keyname, KEY_MENU_REMOTE)) ||
+ t.depth == E_DEPTH_SELECT_LIST ||
+ t.depth == E_DEPTH_SHOW_LIST)
return;
it = elm_object_focused_item_get(obj);
if (!ev->keyname)
return;
- if (!strcmp(ev->keyname, KEY_BACK))
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE))
m_DestroyPopup();
}
switch (id) {
case CONTEXT_VIEW:
{
- if (!strcmp(ev->keyname, KEY_BACK)) {
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE)) {
if (m->ctxtinfo && m->ctxtinfo->close)
m->ctxtinfo->close(m->ctxtinfo->cbdata);
}
case CONTEXT_VIEW_BUTTON_REMOVESONG:
case CONTEXT_VIEW_BUTTON_DELETE:
{
- if (strcmp(ev->keyname, KEY_ENTER))
+ if (strcmp(ev->keyname, KEY_ENTER) &&
+ strcmp(ev->keyname, KEY_ENTER_REMOTE))
return;
m_HandleBtnSelected(id);
if (!obj || !ev)
return;
- if (strcmp(ev->keyname, KEY_ENTER))
+ if (strcmp(ev->keyname, KEY_ENTER) &&
+ strcmp(ev->keyname, KEY_ENTER_REMOTE))
return;
m_HandleMoreinfoSelected(obj);
if (!obj || !ev)
return;
- if (strcmp(ev->keyname, KEY_ENTER))
+ if (strcmp(ev->keyname, KEY_ENTER) &&
+ strcmp(ev->keyname, KEY_ENTER_REMOTE))
return;
elm_object_signal_emit(obj, MUSIC_SIGNAL_CONTENT_CLICKED,
#include <InputHandler.h>
#include "entry-popup.h"
-//#define KEY_SELECT "Select"
-#define KEY_POPUP_ENTER "Return"
-
struct SEntryPopup {
Evas_Object *layout;
if (!ev->keyname)
return;
- if (strcmp(ev->keyname, KEY_BACK) == 0)
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE))
Destroy();
- // Keyname should be checked!!!
- else if (strcmp(ev->keyname, KEY_POPUP_ENTER/*KEY_SELECT*/) == 0) {
+ else if (!strcmp(ev->keyname, KEY_ENTER) ||
+ !strcmp(ev->keyname, KEY_ENTER_REMOTE)) {
str = elm_entry_entry_get(obj);
if (m->cbEntryName && str)
m->cbEntryName(m->data, str);
switch (id) {
case FOLDER_LAYOUT:
{
- if (!strcmp(ev->keyname, KEY_BACK)) {
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE)) {
if (m->depth == E_DEPTH_SONG) {
m->depth = E_DEPTH_FOLDER;
m_UpdateFolderGrid(false);
if (!obj)
return;
- if (strcmp(ev->keyname, KEY_MENU))
+ if (strcmp(ev->keyname, KEY_MENU) &&
+ strcmp(ev->keyname, KEY_MENU_REMOTE))
return;
it = elm_object_focused_item_get(obj);
void CPlaybackView::m_HandleKeyPress(char *keyname)
{
- if (strcmp(keyname, (char*)KEY_EXIT) == 0)
+ if (!strcmp(keyname, (char *)KEY_EXIT))
m_KeyExitPress();
- else if (strcmp(keyname, (char*)KEY_BACK) == 0)
+ else if (!strcmp(keyname, (char *)KEY_BACK) ||
+ !strcmp(keyname, (char *)KEY_BACK_REMOTE))
m_KeyBackPress();
- else if (strcmp(keyname, (char*)KEY_PLAY) == 0)
+ else if (!strcmp(keyname, (char *)KEY_PLAY))
m_KeyPlayPress();
- else if (strcmp(keyname, (char*)KEY_PAUSE) == 0)
+ else if (!strcmp(keyname, (char *)KEY_PAUSE))
m_KeyPausePress();
- else if (strcmp(keyname, (char*)KEY_NEXT) == 0)
+ else if (!strcmp(keyname, (char *)KEY_NEXT))
m_KeyNextPress();
- else if (strcmp(keyname, (char*)KEY_PREVIOUS) == 0)
+ else if (!strcmp(keyname, (char *)KEY_PREVIOUS))
m_KeyPreviousPress();
- else if (strcmp(keyname, (char*)KEY_VOLUMEUP) == 0)
+ else if (!strcmp(keyname, (char *)KEY_VOLUMEUP))
m->pHandleVolume->Up();
- else if (strcmp(keyname, (char*)KEY_VOLUMEDOWN) == 0)
+ else if (!strcmp(keyname, (char *)KEY_VOLUMEDOWN))
m->pHandleVolume->Down();
- else if (strcmp(keyname, (char*)KEY_MUTE) == 0)
+ else if (!strcmp(keyname, (char *)KEY_MUTE))
m->pHandleVolume->Mute();
}
break;
case EO_ERROR_POPUP_BUTTON:
- if (!strcmp(ev->keyname, KEY_BACK)) {
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE)) {
m_DestroyErrorPopup();
elm_object_focus_set(m->eoBtnControl[BTN_PLAY], EINA_TRUE);
}
SContentInfo *ctxtinfo = NULL;
SItemInfo *itinfo = NULL;
- if (strcmp(ev->keyname, KEY_MENU))
+ if (strcmp(ev->keyname, KEY_MENU) &&
+ strcmp(ev->keyname, KEY_MENU_REMOTE))
return;
it = elm_object_focused_item_get(obj);
}
case EO_BOX:
- if (!strcmp(ev->keyname, KEY_BACK)) {
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE)) {
_ERR("eoCtxPopup BACK key pressed ");
m_DestroySettingsPopup();
elm_object_focus_set(m->eoBtnControl[BTN_SETTINGS], EINA_TRUE);
switch (id) {
case SONG_LAYOUT:
{
- if (!strcmp(ev->keyname, KEY_BACK)) {
+ if (!strcmp(ev->keyname, KEY_BACK) ||
+ !strcmp(ev->keyname, KEY_BACK_REMOTE)) {
SParcel parcel;
parcel.ctxtInfo = NULL;
parcel.updateType = E_FOCUS_UPDATE;
SContentInfo *ctxtinfo = NULL;
SSongItemInfo *itinfo = NULL;
- if (strcmp(ev->keyname, KEY_MENU))
+ if (strcmp(ev->keyname, KEY_MENU) &&
+ strcmp(ev->keyname, KEY_MENU_REMOTE))
return;
it = elm_object_focused_item_get(obj);