File tree Expand file tree Collapse file tree 4 files changed +19
-20
lines changed
windows/src/engine/keyman32 Expand file tree Collapse file tree 4 files changed +19
-20
lines changed Original file line number Diff line number Diff line change @@ -105,23 +105,22 @@ kmx_processor::update_option(
105105
106106km_kbp_status
107107kmx_processor::external_event (
108- km_kbp_state* state,
109- uint32_t event,
110- void * _kmn_unused (data)
111- ) {
108+ km_kbp_state* state,
109+ uint32_t event,
110+ void * _kmn_unused (data)
111+ ) {
112112
113- switch (event){
114- case KM_KBP_EVENT_KEYBOARD_ACTIVATED:{
113+ switch (event) {
114+ case KM_KBP_EVENT_KEYBOARD_ACTIVATED:
115115 // reset any current actions in the queue as a new keyboard
116116 // has been activated
117117 _kmx.GetActions ()->ResetQueue ();
118118 state->actions ().clear ();
119- KMX_DWORD dummy_modifiers = 0 ;
120- if (_kmx. GetKeyboard ()-> Keyboard -> dwFlags & KF_CAPSALWAYSOFF) {
121- _kmx.SetCapsLock (dummy_modifiers, FALSE , TRUE );
119+ if (_kmx. GetKeyboard ()-> Keyboard -> dwFlags & KF_CAPSALWAYSOFF) {
120+ KMX_DWORD dummy_modifiers = 0 ;
121+ _kmx.SetCapsLock (dummy_modifiers, FALSE , TRUE );
122122 }
123- }
124- break ;
123+ break ;
125124 default :
126125 return KM_KBP_STATUS_INVALID_ARGUMENT;
127126 }
Original file line number Diff line number Diff line change 1919#include < iostream>
2020#include < sstream>
2121
22- /* * This test will test the infrastructure around the external event processing
23- * The functions tested are:
24- * km_kbp_event with the event KM_KBP_EVENT_KEYBOARD_ACTIVATED
25- *
22+ /* *
23+ * This test will test the infrastructure around the external event processing
24+ * The functions tested are:
25+ * - km_kbp_event with the event KM_KBP_EVENT_KEYBOARD_ACTIVATED
2626 */
2727
2828using namespace km ::kbp::kmx;
@@ -33,8 +33,8 @@ km_kbp_option_item test_env_opts[] =
3333};
3434
3535int error_args () {
36- std::cerr << " kmx: Not enough arguments." << std::endl;
37- return 1 ;
36+ std::cerr << " kmx: Not enough arguments." << std::endl;
37+ return 1 ;
3838}
3939
4040void test_external_event (const km::kbp::path &source_file){
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ ProcessActionsExternalEvent() {
218218 if (!_td) {
219219 return FALSE ;
220220 }
221- // Currently the only Action handled is KM_KBP_IT_CAPSLOCK .
221+ // Currently only a subset of actions are handled .
222222 // Other actions will be added when needed.
223223 BOOL continueProcessingActions = TRUE ;
224224 for (auto act = km_kbp_state_action_items (_td->lpActiveKeyboard ->lpCoreKeyboardState , nullptr ); act->type != KM_KBP_IT_END;
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ BOOL ProcessActionsNonUpdatableParse(BOOL* emitKeyStroke);
3030 * This function processes the actions queued in the core processor in
3131 * the external event case. That is actions not caused by a keystroke but from selecting a
3232 * different keyboard for example.
33- * Currently only CAPS Lock and invalidate key stroke are processed.
33+ * Currently only KM_KBP_IT_CAPSLOCK and KM_KBP_IT_INVALIDATE_CONTEXT are processed.
3434 *
35- * @return BOOL True if actions were successfully processed
35+ * @return BOOL TRUE if actions were successfully processed
3636 */
3737BOOL ProcessActionsExternalEvent ();
3838
You can’t perform that action at this time.
0 commit comments