Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

第三方程序中无法使用相机快门键(EKeyCamera事件)

From Wiki
Jump to: navigation, search
Article Metadata

测试基于
设备:: Nokia N70, Nokia N90

兼容于
文章
翻译:
huwell
最后由 hamishwillee 在 09 Aug 2012 编辑
  • 详细描述

无法在捕捉图像时使用相机快门键,因为它是专为系统相机程序保留的。SDK头文件eikon.hrh列示了相机快门键(EKeyCamera)的键值。但这个事件只能被系统相机程序捕捉,无法提供给第三方程序使用。


  • 解决方案

暂无解决方案(可以捕捉EKeyCamera事件)


具有自动对焦能力的手机: 对拥有自动对焦能力的相机来说可以使用另一个键值来处理快门键,拥有SwEvent能力的程序即可捕捉到这个键值事件。

#define EKeyCameraShutter 0xf883

该键值的事件需要在window server中显式的请求:

    // Capture events from the camera shutter key (SwEvent capability required)
 
iCameraKeyHandle = iCoeEnv->RootWin().CaptureKey( EKeyCameraShutter, 0, 0 );


返回值iCameraKeyHandle(TInt32)可以用来取消该键捕捉请求,特别当退出程序时:

    if ( iCameraKeyHandle >= 0 )
 
{
 
iCoeEnv->RootWin().CancelCaptureKey( iCameraKeyHandle );
 
}


对焦键事件: 半按下快门键将产生另一个不同的按键事件(对焦),可以通过下列scan code来检测该键的EEventKeyDown和EEventKeyUp事件:

 #define EStdKeyCameraFocus 0xe2


 #define EStdKeyCameraFocus2 0xeb  // for 3rd FP2, added by Cxt

Version Hint

Windows Phone: [[Category:Windows Phone]]
[[Category:Windows Phone 7.5]]
[[Category:Windows Phone 8]]

Nokia Asha: [[Category:Nokia Asha]]
[[Category:Nokia Asha Platform 1.0]]

Series 40: [[Category:Series 40]]
[[Category:Series 40 1st Edition]] [[Category:Series 40 2nd Edition]]
[[Category:Series 40 3rd Edition (initial release)]] [[Category:Series 40 3rd Edition FP1]] [[Category:Series 40 3rd Edition FP2]]
[[Category:Series 40 5th Edition (initial release)]] [[Category:Series 40 5th Edition FP1]]
[[Category:Series 40 6th Edition (initial release)]] [[Category:Series 40 6th Edition FP1]] [[Category:Series 40 Developer Platform 1.0]] [[Category:Series 40 Developer Platform 1.1]] [[Category:Series 40 Developer Platform 2.0]]

Symbian: [[Category:Symbian]]
[[Category:S60 1st Edition]] [[Category:S60 2nd Edition (initial release)]] [[Category:S60 2nd Edition FP1]] [[Category:S60 2nd Edition FP2]] [[Category:S60 2nd Edition FP3]]
[[Category:S60 3rd Edition (initial release)]] [[Category:S60 3rd Edition FP1]] [[Category:S60 3rd Edition FP2]]
[[Category:S60 5th Edition]]
[[Category:Symbian^3]] [[Category:Symbian Anna]] [[Category:Nokia Belle]]

This page was last modified on 9 August 2012, at 04:58.
133 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×