Skip to content

Commit

Permalink
xrEngine: fix double layout swith
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Jul 25, 2018
1 parent daf3890 commit 10d2ff5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/xrEngine/line_edit_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,6 @@ void line_edit_control::init(u32 str_buffer_size, init_mode mode)
assign_callback(SDL_SCANCODE_BACKSPACE, ks_Ctrl, Callback(this, &line_edit_control::delete_word_back));
assign_callback(SDL_SCANCODE_DELETE, ks_Ctrl, Callback(this, &line_edit_control::delete_word_forward));

assign_callback(SDL_SCANCODE_LSHIFT, ks_Ctrl, Callback(this, &line_edit_control::SwitchKL));
assign_callback(SDL_SCANCODE_LSHIFT, ks_Alt, Callback(this, &line_edit_control::SwitchKL));

} // if mode

create_key_state(SDL_SCANCODE_LSHIFT, ks_LShift);
Expand Down Expand Up @@ -740,7 +737,6 @@ void line_edit_control::compute_positions()
}

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

void remove_spaces(pstr str)
Expand Down
1 change: 0 additions & 1 deletion src/xrEngine/line_edit_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ class ENGINE_API line_edit_control
void xr_stdcall delete_selected_forward();
void xr_stdcall delete_word_back();
void xr_stdcall delete_word_forward();
void xr_stdcall SwitchKL();

void assign_char_pairs(init_mode mode);
void create_key_state(int const dik, key_state state);
Expand Down
4 changes: 4 additions & 0 deletions src/xrEngine/xr_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ void CInput::KeyUpdate()
keyboardState[event.key.keysym.scancode] = false;
cbStack.back()->IR_OnKeyboardRelease(event.key.keysym.scancode);
break;

case SDL_TEXTINPUT:
Msg("Input: [%s]\n", event.text.text);
break;
}
}

Expand Down

0 comments on commit 10d2ff5

Please sign in to comment.