Honorable Member Owsap 10870 Posted September 19, 2021 Honorable Member Share Posted September 19, 2021 (edited) M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) This is the hidden content, please Sign In or Sign Up ( GitHub ) This is the hidden content, please Sign In or Sign Up ( MEGA ) As the title indicates, the system allows you to change the default keyboard keys. Click here to check the tutorial for adding new keys & functions. Click here for tab targeting key support. Edited September 25, 2021 by Owsap Added left alt show name and quick page toggle. 205 4 1 2 1 1 50 11 98 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/ Share on other sites More sharing options...
r00t3r 67 Posted September 19, 2021 Share Posted September 19, 2021 (edited) Wow, very nice ! But i have this problem Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143236 Share on other sites More sharing options...
VegasForPresident 21 Posted September 19, 2021 Share Posted September 19, 2021 Owsap + Mali = Mowsap ? ! ;D 5 Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143246 Share on other sites More sharing options...
Honorable Member Owsap 10870 Posted September 19, 2021 Author Honorable Member Share Posted September 19, 2021 (edited) 4 hours ago, r00t3r said: Wow, very nice ! But i have this problem Make sure you edited the OnKeyDown and OnKeyUp functions correctly in game.py Take a look at this full file example (search for ENABLE_KEYCHANGE_SYSTEM) : https://metin2.dev/bin/?72e463b192aad6b3#68pcPKajtU3EkfS15G9Cr3uD6A8fW1LbAqfXQZ2NPiGA Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal 7 1 1 1 4 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143248 Share on other sites More sharing options...
r00t3r 67 Posted September 19, 2021 Share Posted September 19, 2021 (edited) 6 hours ago, Owsap said: Make sure you edited the OnKeyDown and OnKeyUp functions correctly in game.py Take a look at this full file example (search for ENABLE_KEYCHANGE_SYSTEM) : https://metin2.dev/bin/?72e463b192aad6b3#68pcPKajtU3EkfS15G9Cr3uD6A8fW1LbAqfXQZ2NPiGA I fixed it, but from f5 upwards no button works. Why ? I have certain systems on those keys Edited September 19, 2021 by r00t3r 2 Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143276 Share on other sites More sharing options...
Honorable Member Owsap 10870 Posted September 19, 2021 Author Honorable Member Share Posted September 19, 2021 (edited) 3 hours ago, r00t3r said: I fixed it, but from f5 upwards no button works. Why ? I have certain systems on those keys I couldn't identify any problem with the key changing, before posting everything I took the time to implement the system on a clean binary source. Once again, I checked and everything seems to be working correctlty. Preview 1 / Preview 2 Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 8 2 1 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143280 Share on other sites More sharing options...
r00t3r 67 Posted September 20, 2021 Share Posted September 20, 2021 (edited) 7 hours ago, Owsap said: I couldn't identify any problem with the key changing, before posting everything I took the time to implement the system on a clean binary source. Once again, I checked and everything seems to be working correctlty. Preview 1 / Preview 2 Hi, I don't think I explained well enough. Let's say that I in game.py defined a system on the f10 button. If I press f10 in the game, it will not work try this Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143287 Share on other sites More sharing options...
Jxxkub 62 Posted September 20, 2021 Share Posted September 20, 2021 For quickslots, if you pressed SHIFT + 1 (default quickslot keybind) it would go to the second slot, not the first. a simple fix for this: PythonPlayerInputKeyboard.cpp case KEY_SLOT_CHANGE_1: SetQuickPage(1); break; case KEY_SLOT_CHANGE_2: SetQuickPage(2); break; case KEY_SLOT_CHANGE_3: SetQuickPage(3); break; case KEY_SLOT_CHANGE_4: SetQuickPage(4); break; Change to: case KEY_SLOT_CHANGE_1: SetQuickPage(0); break; case KEY_SLOT_CHANGE_2: SetQuickPage(1); break; case KEY_SLOT_CHANGE_3: SetQuickPage(2); break; case KEY_SLOT_CHANGE_4: SetQuickPage(3); break; 1 Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143299 Share on other sites More sharing options...
Honorable Member Owsap 10870 Posted September 20, 2021 Author Honorable Member Share Posted September 20, 2021 (edited) Thanks @Jxxkub, the quick slot pagination is now fixed, check the repository. Tutorial for adding new keys & functions. This is the hidden content, please Sign In or Sign Up This is just an example to guide the implementation of new keys and functions. Edited September 20, 2021 by Owsap 95 1 3 1 15 3 27 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143322 Share on other sites More sharing options...
PetePeter 38 Posted September 20, 2021 Share Posted September 20, 2021 Thanks a lot @Owsap! Excellent work. Do you know than if you have the chat or any private message open when you try to change any key the input going to the chat / private message ? Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143335 Share on other sites More sharing options...
VegasForPresident 21 Posted September 21, 2021 Share Posted September 21, 2021 (edited) yoo @ Owsap CAN I GET THIS MA BOY #if defined(ENABLE_TAB_NEXT_TARGET) case KEY_NEXT_TARGET: SelectNearTarget(); break; #endif IM TALKING ABOUT THE "SelectNearTarget();" ( Smiley is the best!) Edited September 21, 2021 by VegasForPresident Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143384 Share on other sites More sharing options...
Honorable Member xP3NG3Rx 22400 Posted September 22, 2021 Honorable Member Share Posted September 22, 2021 (edited) On the official there are no differences between left and right shift, alt nor ctrl. All of them are bound to left+key. In your code I've seen you made it for both, but in the locale files there are no reference to them. Spoiler Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal 9 4 4 Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143417 Share on other sites More sharing options...
Honorable Member Owsap 10870 Posted September 22, 2021 Author Honorable Member Share Posted September 22, 2021 (edited) 1 hour ago, xP3NG3Rx said: On the official there are no differences between left and right shift, alt nor ctrl. All of them are bound to left+key. In your code I've seen you made it for both, but in the locale files there are no reference to them. Reveal hidden contents I actually added them just for support in case it ends up beeing used. Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 1 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143426 Share on other sites More sharing options...
Thrall 261 Posted September 22, 2021 Share Posted September 22, 2021 Thank you for contribution Owsap! Want to hire me? Check my topic Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143449 Share on other sites More sharing options...
HFWhite 771 Posted September 24, 2021 Share Posted September 24, 2021 Hello @ Owsap and thank you for this system. Can you give us this function please? SelectNearTarget(); for the tab targeting system, because we get this error: 'SelectNearTarget': identifier not found Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143473 Share on other sites More sharing options...
r00t3r 67 Posted September 24, 2021 Share Posted September 24, 2021 30 minutes ago, SCOOB said: Hello @ Owsap and thank you for this system. Can you give us this function please? SelectNearTarget(); for the tab targeting system, because we get this error: 'SelectNearTarget': identifier not found https://metin2.dev/board/topic/18280-tab-targeting-gf-v161/ Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143474 Share on other sites More sharing options...
HFWhite 771 Posted September 24, 2021 Share Posted September 24, 2021 I have the system installed, but it's missing this piece of code to make it work with the Keyboard System: SelectNearTarget(); Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143475 Share on other sites More sharing options...
PetePeter 38 Posted September 24, 2021 Share Posted September 24, 2021 22 minutes ago, SCOOB said: I have the system installed, but it's missing this piece of code to make it work with the Keyboard System: SelectNearTarget(); Just do this following: //Find #if defined(ENABLE_TAB_NEXT_TARGET) case KEY_NEXT_TARGET: SelectNearTarget(); break; #endif // Replace by #if defined(ENABLE_TAB_NEXT_TARGET) case KEY_NEXT_TARGET: { const auto rkPlayer = CPythonPlayer::InstancePtr(); if (rkPlayer) { const auto pkInstTarget = CPythonCharacterManager::Instance().GetTabNextTargetPointer(rkPlayer->NEW_GetMainActorPtr()); if (pkInstTarget) rkPlayer->SetTarget(pkInstTarget->GetVirtualID(), true); } break; } #endif Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143476 Share on other sites More sharing options...
HFWhite 771 Posted September 24, 2021 Share Posted September 24, 2021 Thanks @PetePeter it works. But the Tab key still works along with the new assigned key.. so you have 2 x keys for Tab Target. Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143481 Share on other sites More sharing options...
Honorable Member Owsap 10870 Posted September 24, 2021 Author Honorable Member Share Posted September 24, 2021 (edited) Support for Tab Targeting This is the hidden content, please Sign In or Sign Up Edited September 25, 2021 by Owsap 37 1 1 1 3 2 15 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143482 Share on other sites More sharing options...
HFWhite 771 Posted September 25, 2021 Share Posted September 25, 2021 (edited) @ Owsap I did that, but now the Tab key won't work. And I think there's a problem with the Tab Key in general, If I assign a default function(from uikeychange) the Tab Key it won't work. Edited September 25, 2021 by SCOOB Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143500 Share on other sites More sharing options...
PetePeter 38 Posted September 25, 2021 Share Posted September 25, 2021 31 minutes ago, SCOOB said: @ Owsap I did that, but now the Tab key won't work. And I think there's a problem with the Tab Key in general, If I assign a default function(from uikeychange) the Tab Key it won't work. You must have done something wrong, for me everything working fine Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143501 Share on other sites More sharing options...
Active Member Vaynz 2334 Posted September 30, 2021 Active Member Share Posted September 30, 2021 (edited) I received some messages at odds with the problem at switchbot F5 (Keyboard Offical Setting). Here is a short solution. "wHy Is NoT WoRkInG sWiTcHbOt", of course is not working because is not defined in game.py, is defined in interfacemodule.py. There is short solution for your problem, can be improved as well. onPressKeyDict[app.DIK_F5] = lambda : self.interface.ToggleSwitchbotWindow() ---- Let's start --- Binary PythonPlayerInputKeyboard.cpp Search: case KEY_SHOW_NAME: PyCallClassMemberFunc(m_ppyGameWindow, "ShowName", Py_BuildValue("()")); break; Add after: case KEY_SWITCHBOT_W: PyCallClassMemberFunc(m_ppyGameWindow, "Switchbot", Py_BuildValue("()")); break; Gametype.h Search: KEY_PASSIVE_ATTR2, Add after: KEY_SWITCHBOT_W, PythonPlayerModule.cpp Search: PyModule_AddIntConstant(poModule, "KEY_PASSIVE_ATTR2", KEY_PASSIVE_ATTR2); Add after: PyModule_AddIntConstant(poModule, "KEY_SWITCHBOT_W", KEY_SWITCHBOT_W); --- Python part --- root Uikeychange.py Search: self.KeySlotMax = 66 Replace: self.KeySlotMax = 67 ... Search: KeyUiInfoDick[65] = app.DIK_X Add after: KeyUiInfoDick[66] = app.DIK_F5 ... Search: KeyFunctionInfo[65] = player.KEY_SHOW_NAME Add after: KeyFunctionInfo[66] = player.KEY_SWITCHBOT_W ... Now game.py Search self.onClickKeyDict=onClickKeyDict Add after def Switchbot(self): import LURMxMaKZJqliYt2QSHG as chat chat.AppendChat(chat.CHAT_TYPE_INFO, "Test if work") self.interface.ToggleSwitchbotWindow() ... You can remove chat.appendchat and import, i tested if is sending. Good luck ! Edited September 30, 2021 by Vaynz Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-143707 Share on other sites More sharing options...
Honorable Member xP3NG3Rx 22400 Posted October 13, 2021 Honorable Member Share Posted October 13, 2021 I just discovered a small bug with the OnKeyDown function in python which is there even on the official servers too. It will never execute the binary side OnKeyDown with the ALT key when the KeySettingBoard is opened. Howover the OnKeyUp always executes. So the quickslot paging will be decreased all the time when you hit the ALT key. Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-144143 Share on other sites More sharing options...
Honorable Member Owsap 10870 Posted October 13, 2021 Author Honorable Member Share Posted October 13, 2021 19 minutes ago, xP3NG3Rx said: I just discovered a small bug with the OnKeyDown function in python which is there even on the official servers too. It will never execute the binary side OnKeyDown with the ALT key when the KeySettingBoard is opened. Howover the OnKeyUp always executes. So the quickslot paging will be decreased all the time when you hit the ALT key. Confirmed, I guess a workaround for this is to check if the key change window is open then ignore the ALT key function until the key change window is closed? https://owsap.dev/ / https://osf.owsap.dev/ Link to comment https://metin2.dev/topic/27930-official-keyboard-settings-system/#findComment-144145 Share on other sites More sharing options...
Recommended Posts
Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now