diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 7ebdb4bfea..1b0136239d 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -1303,7 +1303,7 @@ struct AIDebugWindow : public Window { } } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { EventState state = ES_NOT_HANDLED; int num = CheckHotkeyMatch(aidebug_hotkeys, keycode, this); @@ -1514,7 +1514,7 @@ Window *ShowAIDebugWindow(CompanyID show_company) /** * Handler for global AI debug window hotkeys. */ -EventState AIDebugGlobalHotkeys(uint16 key, uint16 keycode) +EventState AIDebugGlobalHotkeys(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(_aidebug_hotkeys, keycode, NULL, true); if (num == -1) return ES_NOT_HANDLED; diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 402dcea4a0..125e245d3e 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -99,7 +99,7 @@ struct BuildAirToolbarWindow : Window { } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(airtoolbar_hotkeys, keycode, this); if (num == -1) return ES_NOT_HANDLED; @@ -187,7 +187,7 @@ Window *ShowBuildAirToolbar() return AllocateWindowDescFront(&_air_toolbar_desc, TRANSPORT_AIR); } -EventState AirportToolbarGlobalHotkeys(uint16 key, uint16 keycode) +EventState AirportToolbarGlobalHotkeys(WChar key, uint16 keycode) { if (!CanBuildVehicleInfrastructure(VEH_AIRCRAFT)) return ES_NOT_HANDLED; int num = CheckHotkeyMatch(_airtoolbar_hotkeys, keycode, NULL, true); diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index c0a684661b..253b470902 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -163,7 +163,7 @@ struct BuildDocksToolbarWindow : Window { this->last_clicked_widget = (DockToolbarWidgets)widget; } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(dockstoolbar_hotkeys, keycode, this); if (num == -1) return ES_NOT_HANDLED; @@ -335,7 +335,7 @@ Window *ShowBuildDocksToolbar() return AllocateWindowDescFront(&_build_docks_toolbar_desc, TRANSPORT_WATER); } -EventState DockToolbarGlobalHotkeys(uint16 key, uint16 keycode) +EventState DockToolbarGlobalHotkeys(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(_dockstoolbar_hotkeys, keycode, NULL, true); if (num == -1) return ES_NOT_HANDLED; diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp index de95d15187..7e1ec67136 100644 --- a/src/hotkeys.cpp +++ b/src/hotkeys.cpp @@ -294,7 +294,7 @@ void SaveHotkeysToConfig() SaveLoadHotkeys(true); } -typedef EventState GlobalHotkeyHandler(uint16, uint16); +typedef EventState GlobalHotkeyHandler(WChar, uint16); GlobalHotkeyHandler RailToolbarGlobalHotkeys; GlobalHotkeyHandler DockToolbarGlobalHotkeys; diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 5cced077f3..cac5f8c0d4 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -269,7 +269,7 @@ struct MainWindow : Window } } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(global_hotkeys, keycode, this); if (num == GHK_QUIT) { diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 71f80163bf..4233313973 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1440,7 +1440,7 @@ public: } } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { if (this->vehicle->owner != _local_company) return ES_NOT_HANDLED; diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 0faa70c078..24b4691f30 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -597,7 +597,7 @@ struct BuildRailToolbarWindow : Window { if (_ctrl_pressed) RailToolbar_CtrlChanged(this); } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(railtoolbar_hotkeys, keycode, this); if (num == -1) return ES_NOT_HANDLED; @@ -847,7 +847,7 @@ Window *ShowBuildRailToolbar(RailType railtype) return new BuildRailToolbarWindow(&_build_rail_desc, railtype); } -EventState RailToolbarGlobalHotkeys(uint16 key, uint16 keycode) +EventState RailToolbarGlobalHotkeys(WChar key, uint16 keycode) { if (!CanBuildVehicleInfrastructure(VEH_TRAIN)) return ES_NOT_HANDLED; extern RailType _last_built_railtype; diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 4f34230af7..a8e45903d7 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -473,7 +473,7 @@ struct BuildRoadToolbarWindow : Window { if (_ctrl_pressed) RoadToolbar_CtrlChanged(this); } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(roadtoolbar_hotkeys, keycode, this); if (num == -1 || this->GetWidget(num) == NULL) return ES_NOT_HANDLED; @@ -775,7 +775,7 @@ Window *ShowBuildRoadToolbar(RoadType roadtype) return AllocateWindowDescFront(roadtype == ROADTYPE_ROAD ? &_build_road_desc : &_build_tramway_desc, TRANSPORT_ROAD); } -EventState RoadToolbarGlobalHotkeys(uint16 key, uint16 keycode) +EventState RoadToolbarGlobalHotkeys(WChar key, uint16 keycode) { extern RoadType _last_built_roadtype; int num = CheckHotkeyMatch(_roadtoolbar_hotkeys, keycode, NULL, true); @@ -829,7 +829,7 @@ Window *ShowBuildRoadScenToolbar() return AllocateWindowDescFront(&_build_road_scen_desc, TRANSPORT_ROAD); } -EventState RoadToolbarEditorGlobalHotkeys(uint16 key, uint16 keycode) +EventState RoadToolbarEditorGlobalHotkeys(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(_roadtoolbar_hotkeys, keycode, NULL, true); if (num == -1) return ES_NOT_HANDLED; diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index a52da12af8..5cfa13f5f4 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -281,7 +281,7 @@ struct SignListWindow : Window, SignList { } } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { EventState state = ES_NOT_HANDLED; if (CheckHotkeyMatch(signlist_hotkeys, keycode, this) == SLHK_FOCUS_FILTER_BOX) { @@ -386,7 +386,7 @@ Window *ShowSignList() return AllocateWindowDescFront(&_sign_list_desc, 0); } -EventState SignListGlobalHotkeys(uint16 key, uint16 keycode) +EventState SignListGlobalHotkeys(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(_signlist_hotkeys, keycode, NULL, true); if (num == -1) return ES_NOT_HANDLED; diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index d3c28ef9e0..5f0eff0551 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -218,7 +218,7 @@ struct TerraformToolbarWindow : Window { } } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(terraform_hotkeys, keycode, this); if (num == -1) return ES_NOT_HANDLED; @@ -377,7 +377,7 @@ Window *ShowTerraformToolbar(Window *link) return w; } -EventState TerraformToolbarGlobalHotkeys(uint16 key, uint16 keycode) +EventState TerraformToolbarGlobalHotkeys(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(_terraform_hotkeys, keycode, NULL, true); if (num == -1) return ES_NOT_HANDLED; @@ -571,7 +571,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window { } while (--n); } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(terraform_editor_hotkeys, keycode, this); if (num == -1) return ES_NOT_HANDLED; @@ -755,7 +755,7 @@ Window *ShowEditorTerraformToolbar() return AllocateWindowDescFront(&_scen_edit_land_gen_desc, 0); } -EventState TerraformToolbarEditorGlobalHotkeys(uint16 key, uint16 keycode) +EventState TerraformToolbarEditorGlobalHotkeys(WChar key, uint16 keycode) { int num = CheckHotkeyMatch(_terraform_editor_hotkeys, keycode, NULL, true); if (num == -1) return ES_NOT_HANDLED; diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 7cb18de3d7..4557eb899a 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1587,7 +1587,7 @@ struct MainToolbarWindow : Window { if (cbf != CBF_NONE) this->last_started_action = cbf; } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { switch (CheckHotkeyMatch(maintoolbar_hotkeys, keycode, this)) { case MTHK_PAUSE: ToolbarPauseClick(this); break; @@ -1925,7 +1925,7 @@ struct ScenarioEditorToolbarWindow : Window { if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(WChar key, uint16 keycode) { CallBackFunction cbf = CBF_NONE; switch (CheckHotkeyMatch(scenedit_maintoolbar_hotkeys, keycode, this)) {