⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 actdef_sp100.c

📁 可以学习
💻 C
字号:

//-----------------------------------------------------------------------------
// Standard include files:
//-----------------------------------------------------------------------------
//

//-----------------------------------------------------------------------------
// Project include files:
//-----------------------------------------------------------------------------

#include "keyCodeEvent.h"
#include "ActDef.h"
#include "hyTypes.h"

#ifdef __cplusplus
extern "C"
{
#endif

//-----------------------------------------------------------------------------
// Types and defines:
//-----------------------------------------------------------------------------
//
// 各种模式下,键值和状态到键动作事件的转换表
const U8 pkKeyEventArray_SwitchModule[]={
	cHyc_Act_ConfirmSwitch,		Keyb_Code_Menu,			cKEYB_EVENT_RELEASE,

	cHyc_Act_Next,				Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,				Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Next,				Keyb_Code_Next,			cKEYB_EVENT_NORMAL,
	cHyc_Act_Prev,				Keyb_Code_Prev,			cKEYB_EVENT_NORMAL,
	cHyc_Act_NextContinous,		Keyb_Code_NextLongPressed,	cKEYB_EVENT_NORMAL,
	cHyc_Act_PrevContinous,		Keyb_Code_PrevLongPressed,	cKEYB_EVENT_NORMAL,
	
	cHyc_Act_ReturnToFather,	Keyb_Code_Play,			cKEYB_EVENT_RELEASE,
	0xff
};

const U8 pkKeyEventArray_Mp3[]={
	cHyc_Act_PlayPause,			Keyb_Code_Play,			cKEYB_EVENT_RELEASE,

	cHyc_Act_Next,				Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,				Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,

	cHyc_Act_FF_Song,			Keyb_Code_NextLongPressed,	cKEYB_EVENT_NORMAL,
	cHyc_Act_REW_Song,			Keyb_Code_PrevLongPressed,	cKEYB_EVENT_NORMAL,
	cHyc_Act_FF_Cancel,			Keyb_Code_NextLongPressed,	cKEYB_EVENT_RELEASE,
	cHyc_Act_REW_Cancel,		Keyb_Code_PrevLongPressed,	cKEYB_EVENT_RELEASE,

	cHyc_Act_VolUpOnce,				Keyb_Code_VolUp,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolDownOnce,			Keyb_Code_VolDown,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolUpOnce,				Keyb_Code_VolUp,		cKEYB_EVENT_NORMAL,
	cHyc_Act_VolDownOnce,			Keyb_Code_VolDown,		cKEYB_EVENT_NORMAL,
	cHyc_Act_VolUpContinous,		Keyb_Code_VolUpLongPressed,		cKEYB_EVENT_NORMAL,
	cHyc_Act_VolDownContinous,		Keyb_Code_VolDownLongPressed,	cKEYB_EVENT_NORMAL,

	cHyc_Act_SetRepeatPoint,			Keyb_Code_Record,				cKEYB_EVENT_RELEASE,
	cHyc_Act_BackgroundSwitchToBrowser,	Keyb_Code_RecordLongPressed,	cKEYB_EVENT_RELEASE,

	cHyc_Act_BackgroundSwitchToMenu,	Keyb_Code_Menu,				cKEYB_EVENT_RELEASE,
	cHyc_Act_BackgroundSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkActionModify_Mp3[]={
	4,
	cHyc_Act_VolDownOnce_Next,			cHyc_Act_Next,			cHyc_Act_VolUpOnce,
	cHyc_Act_VolUpOnce_Prev,			cHyc_Act_Prev,			cHyc_Act_VolDownOnce,
	cHyc_Act_VolDownContinous_FF_Song,	cHyc_Act_FF_Song,		cHyc_Act_VolUpContinous,
	cHyc_Act_VolUpContinous_REW_Song,	cHyc_Act_REW_Song,		cHyc_Act_VolDownContinous
};

const U8 pkKeyEventArray_Browser[]={
	cHyc_Act_Next,				Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,				Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,
	
	cHyc_Act_VolUpOnce,			Keyb_Code_VolUp,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolDownOnce,		Keyb_Code_VolDown,		cKEYB_EVENT_RELEASE,

	cHyc_Act_DeleteFile,			Keyb_Code_RecordLongPressed,	cKEYB_EVENT_RELEASE,

	cHyc_Act_BrowserConfirm,		Keyb_Code_Menu,				cKEYB_EVENT_RELEASE,

	cHyc_Act_ReturnToFather,		Keyb_Code_Play,				cKEYB_EVENT_RELEASE,
	cHyc_Act_ExitSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkKeyEventArray_FM[]={
	cHyc_Act_Next,					Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,					Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,
	cHyc_Act_SearchNextChannel,		Keyb_Code_NextLongPressed,	cKEYB_EVENT_NORMAL,
	cHyc_Act_SearchPrevChannel,		Keyb_Code_PrevLongPressed,	cKEYB_EVENT_NORMAL,

	cHyc_Act_VolUpOnce,				Keyb_Code_VolUp,			cKEYB_EVENT_RELEASE,
	cHyc_Act_VolDownOnce,			Keyb_Code_VolDown,			cKEYB_EVENT_RELEASE,
	cHyc_Act_VolUpOnce,				Keyb_Code_VolUp,			cKEYB_EVENT_NORMAL,
	cHyc_Act_VolDownOnce,			Keyb_Code_VolDown,			cKEYB_EVENT_NORMAL,
	cHyc_Act_VolUpContinous,		Keyb_Code_VolUpLongPressed,	cKEYB_EVENT_NORMAL,
	cHyc_Act_VolDownContinous,		Keyb_Code_VolDownLongPressed,	cKEYB_EVENT_NORMAL,

	cHyc_Act_BackgroundSwitchToRecord,	Keyb_Code_RecordLongPressed,cKEYB_EVENT_RELEASE,
	
	cHyc_Act_SaveChannel_DelChannel,	Keyb_Code_Play,				cKEYB_EVENT_RELEASE,
	cHyc_Act_ToggleManualPreset,		Keyb_Code_Record,			cKEYB_EVENT_RELEASE,

	cHyc_Act_BackgroundSwitchToMenu,	Keyb_Code_Menu,				cKEYB_EVENT_RELEASE,
	cHyc_Act_BackgroundSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkActionModify_FM[]={
	5,
	cHyc_Act_VolDownOnce_Next,			cHyc_Act_Next,				cHyc_Act_VolUpOnce,
	cHyc_Act_VolUpOnce_Prev,			cHyc_Act_Prev,				cHyc_Act_VolDownOnce,
	cHyc_Act_VolDownContinous_FF_Song,	cHyc_Act_SearchNextChannel,	cHyc_Act_VolUpContinous,
	cHyc_Act_VolUpContinous_REW_Song,	cHyc_Act_SearchPrevChannel,	cHyc_Act_VolDownContinous,
	cHyc_Act_SaveChannel_DelChannel,	cHyc_Act_SaveChannel,		cHyc_Act_DeleteChannel
};

const U8 pkKeyEventArray_Record[]={
	cHyc_Act_RecordStartStop,	Keyb_Code_RecordLongPressed,	cKEYB_EVENT_RELEASE,
	cHyc_Act_Stop,				Keyb_Code_Record,				cKEYB_EVENT_RELEASE,
	cHyc_Act_Pause,				Keyb_Code_Play,					cKEYB_EVENT_RELEASE,

	cHyc_Act_VolUpOnce,			Keyb_Code_VolUp,				cKEYB_EVENT_RELEASE,
	cHyc_Act_VolDownOnce,		Keyb_Code_VolDown,				cKEYB_EVENT_RELEASE,
	cHyc_Act_VolUpOnce,			Keyb_Code_VolUp,				cKEYB_EVENT_NORMAL,
	cHyc_Act_VolDownOnce,			Keyb_Code_VolDown,			cKEYB_EVENT_NORMAL,
	cHyc_Act_VolUpContinous,		Keyb_Code_VolUpLongPressed,	cKEYB_EVENT_NORMAL,
	cHyc_Act_VolDownContinous,		Keyb_Code_VolDownLongPressed,	cKEYB_EVENT_NORMAL,

	cHyc_Act_BackgroundSwitchToMenu,	Keyb_Code_Menu,				cKEYB_EVENT_RELEASE,
	cHyc_Act_BackgroundSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkKeyEventArray_Picture[]={
	cHyc_Act_ConfirmSwitch,		Keyb_Code_Menu,			cKEYB_EVENT_RELEASE,

	cHyc_Act_Next,				Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,				Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,
	cHyc_Act_VolUpOnce,			Keyb_Code_VolUp,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolDownOnce,		Keyb_Code_VolDown,		cKEYB_EVENT_RELEASE,

	cHyc_Act_DeleteFile,			Keyb_Code_RecordLongPressed,	cKEYB_EVENT_RELEASE,
	
	cHyc_Act_ReturnToFather,		Keyb_Code_Play,					cKEYB_EVENT_RELEASE,
	cHyc_Act_ExitSwitchToSwitch,	Keyb_Code_MenuLongPressed,		cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkKeyEventArray_Ebook[]={
	cHyc_Act_Prev,				Keyb_Code_VolUp,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Next,				Keyb_Code_VolDown,			cKEYB_EVENT_RELEASE,

	//用于电子书段落浏览、快速定位、颜色调整
	cHyc_Act_PrevSegment,		Keyb_Code_Prev,				cKEYB_EVENT_NORMAL,
	cHyc_Act_NextSegment,		Keyb_Code_Next,				cKEYB_EVENT_NORMAL,
	cHyc_Act_PrevSegment,		Keyb_Code_PrevLongPressed,	cKEYB_EVENT_NORMAL,
	cHyc_Act_NextSegment,		Keyb_Code_NextLongPressed,	cKEYB_EVENT_NORMAL,

	cHyc_Act_PrevBlock,			Keyb_Code_VolUp,				cKEYB_EVENT_NORMAL,
	cHyc_Act_NextBlock,			Keyb_Code_VolDown,				cKEYB_EVENT_NORMAL,
	cHyc_Act_PrevBlock,			Keyb_Code_VolUpLongPressed,		cKEYB_EVENT_NORMAL,
	cHyc_Act_NextBlock,			Keyb_Code_VolDownLongPressed,	cKEYB_EVENT_NORMAL,
	//-----------------------

	cHyc_Act_EnterChild,			Keyb_Code_Record,			cKEYB_EVENT_RELEASE,
	cHyc_Act_SelectFavorite,		Keyb_Code_Menu,				cKEYB_EVENT_RELEASE,

	cHyc_Act_ReturnToFather,		Keyb_Code_Play,				cKEYB_EVENT_RELEASE,
	cHyc_Act_ExitSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkKeyEventArray_Thesaurus[]={
	cHyc_Act_ConfirmSwitch,		Keyb_Code_Menu,			cKEYB_EVENT_RELEASE,

	cHyc_Act_Next,				Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,				Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,
	cHyc_Act_VolUpOnce,			Keyb_Code_VolUp,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolDownOnce,		Keyb_Code_VolDown,		cKEYB_EVENT_RELEASE,

	cHyc_Act_BackSpace,			Keyb_Code_Record,				cKEYB_EVENT_RELEASE,
	cHyc_Act_SwitchFocus,		Keyb_Code_VolUpLongPressed,		cKEYB_EVENT_RELEASE,

	cHyc_Act_ReturnToFather,		Keyb_Code_Play,				cKEYB_EVENT_RELEASE,	
	cHyc_Act_ExitSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkKeyEventArray_Game[]={
	cHyc_Act_ParameterSet,		Keyb_Code_Play,			cKEYB_EVENT_RELEASE,

	cHyc_Act_Right,				Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Left,				Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,
	cHyc_Act_VolUpOnce,			Keyb_Code_VolUp,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolDownOnce,		Keyb_Code_VolDown,		cKEYB_EVENT_RELEASE,

	cHyc_Act_ExitSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	cHyc_Act_ConfirmSwitch,			Keyb_Code_Menu,				cKEYB_EVENT_RELEASE,
	
	cHyc_Act_Right_Button,			Keyb_Code_Record,		cKEYB_EVENT_RELEASE,
	0xff
};

const U8 pkKeyEventArray_Menu[]={
	cHyc_Act_MenuConfirm,			Keyb_Code_Menu,			cKEYB_EVENT_RELEASE,

	cHyc_Act_Next,					Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,					Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Next,					Keyb_Code_Next,				cKEYB_EVENT_NORMAL,
	cHyc_Act_Prev,					Keyb_Code_Prev,				cKEYB_EVENT_NORMAL,
	cHyc_Act_Next,					Keyb_Code_NextLongPressed,	cKEYB_EVENT_NORMAL,
	cHyc_Act_Prev,					Keyb_Code_PrevLongPressed,	cKEYB_EVENT_NORMAL,
	
	cHyc_Act_VolUpOnce,				Keyb_Code_VolUp,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolDownOnce,			Keyb_Code_VolDown,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolUpOnce,				Keyb_Code_VolUp,		cKEYB_EVENT_NORMAL,
	cHyc_Act_VolDownOnce,			Keyb_Code_VolDown,		cKEYB_EVENT_NORMAL,
	cHyc_Act_VolUpContinous,		Keyb_Code_VolUpLongPressed,		cKEYB_EVENT_NORMAL,
	cHyc_Act_VolDownContinous,		Keyb_Code_VolDownLongPressed,	cKEYB_EVENT_NORMAL,

	cHyc_Act_ReturnToFather,		Keyb_Code_Play,				cKEYB_EVENT_RELEASE,
	cHyc_Act_ExitSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkKeyEventArray_Calendar[]={
	cHyc_Act_MenuConfirm,			Keyb_Code_Menu,			cKEYB_EVENT_RELEASE,
	cHyc_Act_CalendarSetOrLookOver,	Keyb_Code_Record,		cKEYB_EVENT_RELEASE,

	cHyc_Act_Next,					Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,					Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,

	cHyc_Act_VolUpOnce,				Keyb_Code_VolUp,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolDownOnce,			Keyb_Code_VolDown,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolUpOnce,				Keyb_Code_VolUp,		cKEYB_EVENT_NORMAL,
	cHyc_Act_VolDownOnce,			Keyb_Code_VolDown,		cKEYB_EVENT_NORMAL,
	cHyc_Act_VolUpContinous,		Keyb_Code_VolUpLongPressed,		cKEYB_EVENT_NORMAL,
	cHyc_Act_VolDownContinous,		Keyb_Code_VolDownLongPressed,	cKEYB_EVENT_NORMAL,

	cHyc_Act_ReturnToFather,		Keyb_Code_Play,				cKEYB_EVENT_RELEASE,
	cHyc_Act_ExitSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkKeyEventArray_StopWatch[]={
	cHyc_Act_ConfirmSwitch,		Keyb_Code_Menu,			cKEYB_EVENT_RELEASE,

	cHyc_Act_Next,				Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,				Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,

	cHyc_Act_Pause,				Keyb_Code_Record,		cKEYB_EVENT_RELEASE,

	cHyc_Act_ReturnToFather,		Keyb_Code_Play,				cKEYB_EVENT_RELEASE,
	cHyc_Act_ExitSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkKeyEventArray_Calculator[]={
	cHyc_Act_ConfirmSwitch,		Keyb_Code_Menu,			cKEYB_EVENT_RELEASE,

	cHyc_Act_Next,				Keyb_Code_Next,			cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,				Keyb_Code_Prev,			cKEYB_EVENT_RELEASE,
	cHyc_Act_VolUpOnce,			Keyb_Code_VolUp,		cKEYB_EVENT_RELEASE,
	cHyc_Act_VolDownOnce,		Keyb_Code_VolDown,		cKEYB_EVENT_RELEASE,

	cHyc_Act_CalculatorEQU,		Keyb_Code_Record,			cKEYB_EVENT_RELEASE,	//"="
	cHyc_Act_CalculatorClear,	Keyb_Code_PrevLongPressed,	cKEYB_EVENT_NORMAL,		//clear

	cHyc_Act_ReturnToFather,		Keyb_Code_Play,				cKEYB_EVENT_RELEASE,
	cHyc_Act_ExitSwitchToSwitch,	Keyb_Code_MenuLongPressed,	cKEYB_EVENT_NORMAL,
	0xff
};

const U8 pkKeyEventArray_Camera[]={
	cHyc_Act_MenuConfirm,           Keyb_Code_Menu,		cKEYB_EVENT_RELEASE,
	cHyc_Act_ReturnToFather,		Keyb_Code_Prev,		cKEYB_EVENT_RELEASE,
	cHyc_Act_ParameterSet,			Keyb_Code_Play,		cKEYB_EVENT_RELEASE,	//拍照时切换白天、黑夜模式
	0xff
};

const U8 pkKeyEventArray_Vidicon[]={
	cHyc_Act_MenuConfirm,           Keyb_Code_Menu,		cKEYB_EVENT_RELEASE,
	cHyc_Act_ReturnToFather,		Keyb_Code_Prev,		cKEYB_EVENT_RELEASE,
	0xff
};

const U8 pkKeyEventArray_Dialog[]={
	//确认
	cHyc_Act_MenuConfirm, Keyb_Code_Menu,	cKEYB_EVENT_RELEASE,
	//选择
	cHyc_Act_Next,			Keyb_Code_Next,	cKEYB_EVENT_RELEASE,
	cHyc_Act_Prev,			Keyb_Code_Prev,	cKEYB_EVENT_RELEASE,
	0xff
};

const U8 pkKeyEventArray_PowerOnOff[]={
	//开机键值和状态
	Keyb_Code_PlayLongPressed,	cKEYB_EVENT_NORMAL,
	//关机键值和状态
	Keyb_Code_PlayLongPressed,	cKEYB_EVENT_NORMAL,
};

#ifdef __cplusplus
}
#endif


/*============================ History List ================================
 1. Rev 1.00.00.0000, 2003/mm/dd hh:mm             author name
============================================================================*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -