34 // C++ default constructor can NOT contain any code, that |
36 // C++ default constructor can NOT contain any code, that |
35 // might leave. |
37 // might leave. |
36 // ----------------------------------------------------------- |
38 // ----------------------------------------------------------- |
37 // |
39 // |
38 CPhoneUIController_Stub::CPhoneUIController_Stub() |
40 CPhoneUIController_Stub::CPhoneUIController_Stub() |
39 { |
41 { |
40 m_leave = false; |
42 m_leave = false; |
41 } |
43 } |
42 |
44 |
43 |
45 |
44 |
46 |
45 // ----------------------------------------------------------- |
47 // ----------------------------------------------------------- |
46 // Destructor |
48 // Destructor |
47 // |
49 // |
48 // ----------------------------------------------------------- |
50 // ----------------------------------------------------------- |
49 |
51 |
50 CPhoneUIController_Stub::~CPhoneUIController_Stub() |
52 CPhoneUIController_Stub::~CPhoneUIController_Stub() |
51 { |
53 { |
52 |
54 } |
53 } |
|
54 |
55 |
55 |
56 |
56 |
57 |
57 // --------------------------------------------------------- |
58 // --------------------------------------------------------- |
58 // CPhoneUIController_Stub::HandleKeyEventL |
59 // CPhoneUIController_Stub::HandleKeyEventL |
59 // --------------------------------------------------------- |
60 // --------------------------------------------------------- |
60 // |
61 // |
61 TKeyResponse CPhoneUIController_Stub::HandleKeyEventL( |
62 TKeyResponse CPhoneUIController_Stub::HandleKeyEventL( |
62 const TKeyEvent& aKeyEvent, |
63 const TKeyEvent& aKeyEvent, |
63 TEventCode aEventCode ) |
64 TEventCode aEventCode ) |
64 { |
65 { |
65 m_scan_code = 0; |
66 m_scan_code = 0; |
66 m_code = 0; |
67 m_code = 0; |
67 m_scan_code_down = 0; |
68 m_scan_code_down = 0; |
68 m_code_down = 0; |
69 m_code_down = 0; |
|
70 m_eventCode = aEventCode; |
69 |
71 |
70 if (m_leave) |
72 if (m_leave) { |
71 { |
|
72 User::Leave(KErrArgument); |
73 User::Leave(KErrArgument); |
73 } |
74 } |
74 |
75 |
75 m_repeats = aKeyEvent.iRepeats; |
76 m_repeats = aKeyEvent.iRepeats; |
76 |
77 |
77 if ( EEventKeyUp == aEventCode ) |
78 if(EEventKeyUp == aEventCode) { |
78 { |
|
79 m_scan_code = aKeyEvent.iScanCode; |
79 m_scan_code = aKeyEvent.iScanCode; |
80 m_code = aKeyEvent.iCode; |
80 m_code = aKeyEvent.iCode; |
81 } |
81 } else if(EEventKey == aEventCode) { |
82 else if ( EEventKey == aEventCode ) |
|
83 { |
|
84 m_scan_code_down = aKeyEvent.iScanCode; |
82 m_scan_code_down = aKeyEvent.iScanCode; |
85 m_code_down = aKeyEvent.iCode; |
83 m_code_down = aKeyEvent.iCode; |
86 } |
84 } else if(EEventLongPress) { |
|
85 m_scan_code = aKeyEvent.iScanCode; |
|
86 m_code = aKeyEvent.iCode; |
|
87 } |
87 |
88 |
88 return EKeyWasNotConsumed; |
89 return EKeyWasNotConsumed; |
89 } |
90 } |
90 |
91 |
91 |
92 |
92 |
93 |
93 // End of File |
94 // End of File |