Skip to content

Commit 538f2a9

Browse files
committed
Revert "xrEngine: fix double layout swith"
This reverts commit 10d2ff5.
1 parent 7dec3d7 commit 538f2a9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/xrEngine/line_edit_control.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ void line_edit_control::init(u32 str_buffer_size, init_mode mode)
238238
assign_callback(SDL_SCANCODE_BACKSPACE, ks_Ctrl, Callback(this, &line_edit_control::delete_word_back));
239239
assign_callback(SDL_SCANCODE_DELETE, ks_Ctrl, Callback(this, &line_edit_control::delete_word_forward));
240240

241+
assign_callback(SDL_SCANCODE_LSHIFT, ks_Ctrl, Callback(this, &line_edit_control::SwitchKL));
242+
assign_callback(SDL_SCANCODE_LSHIFT, ks_Alt, Callback(this, &line_edit_control::SwitchKL));
243+
241244
} // if mode
242245

243246
create_key_state(SDL_SCANCODE_LSHIFT, ks_LShift);
@@ -737,6 +740,7 @@ void line_edit_control::compute_positions()
737740
}
738741

739742
void line_edit_control::clamp_cur_pos() { clamp(m_cur_pos, 0, (int)xr_strlen(m_edit_str)); }
743+
void line_edit_control::SwitchKL() { ActivateKeyboardLayout((HKL)HKL_NEXT, 0); }
740744
// -------------------------------------------------------------------------------------------------
741745

742746
void remove_spaces(pstr str)

src/xrEngine/line_edit_control.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class ENGINE_API line_edit_control
103103
void xr_stdcall delete_selected_forward();
104104
void xr_stdcall delete_word_back();
105105
void xr_stdcall delete_word_forward();
106+
void xr_stdcall SwitchKL();
106107

107108
void assign_char_pairs(init_mode mode);
108109
void create_key_state(int const dik, key_state state);

src/xrEngine/xr_input.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,6 @@ void CInput::KeyUpdate()
186186
keyboardState[event.key.keysym.scancode] = false;
187187
cbStack.back()->IR_OnKeyboardRelease(event.key.keysym.scancode);
188188
break;
189-
190-
case SDL_TEXTINPUT:
191-
Msg("Input: [%s]\n", event.text.text);
192-
break;
193189
}
194190
}
195191

0 commit comments

Comments
 (0)