I know that it's possible to use autohotkey to disable it but I don't really want to run/install more programs than I have to.
Any info would be great
![Smile :)](./images/smilies/icon_e_smile.gif)
Code: Select all
function hook(vk)
if( vk == key.VK_LWIN or vk == key.VK_RWIN ) then
return true; -- Ignore the LWIN/RWIN keys
else
return false; -- Let the key go through
end
end
function macro.init()
keyboard.setHookCallback(hook);
end
function macro.main(dt)
return true; -- Keep running until we say otherwise.
end
Code: Select all
/* keyboard.setHookCallback(nil|function callback)
Returns: boolean
Attempt to install a keyboard hook. The callback should be a function
that accepts a single number: the virtual key code.
If the callback returns true, the key will be dropped.
If the callback returns false or nil, the input be left in the queue.
If you pass nil as the callback, the keyboard hook will instead
be removed.
Please note that your callback function should return almost immediately
so you aren't clogging up the input system.
Your main function must also execute quickly (so don't use any rests!).
Failure to execute quickly may lead to dropped or lagged user input.
*/
Code: Select all
function keyboardHook(vk)
if( window.getFocusHwnd() == _game_client_window ) then
if( vk == key.VK_F4 and keyboard.isDown(key.VK_ALT) ) then
return true;
end
end
return false;
end
I knew I would be able to do that. What i'm wondering is, would MM be able to disable the shortcut function, not the actual keys? I want to be able to use the ALT key with the F4 key while in game, but I don't want the windows alt-f4 function kicking in and trying to close the client when I do.Administrator wrote: This should only ignore the F4 key (and hence disabling the ALT+F4 combo) when the client window is selected and the user is holding ALT.
No no. In ArcheAge the 'self-cast' key is Alt. So in order to self cast, say, Resurgence (the main healing spell) I have to hold Alt and press the hotkey related to the skill I want to cast.lisa wrote:from what I can gather you don't actually want to use alt and f4 at the same time, it just happens from time to time. So in the hook if MM detects that Alt is pressed when F4 is pressed tell it to release Alt and then press F4 for you.
Sorry about the late reply!ZZZZZ wrote:Hey Admin,
Sorry for reviving an old topic! I was just wondering if you could also add a similar hook for mouse keys? I tried transplanting the keyboard hook function into the mouse_lua.cpp file and attempted to change all the necessary stuff... but yeh, obviously I have no idea what I am doing haha.
Reason: I have been playing a lot of PUBG lately and to use iron sights you have to click to enter, click again to exit. I am so used to games like CoD and Battlefield where I hold down the key to iron sights that I keep stuffing it up in tense situations... usually resulting in me missing everything
So basically just want to make it so when I hold right mouse button, MM will send a click instead and when I release the key, it'll send another click.
Thanks
Users browsing this forum: No registered users and 0 guests