Thread: Disable Function Key Default Actions

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11  
    Registered Member
    Join Date
    Jul 2013
    Posts
    181
    Thanks given
    3
    Thanks received
    12
    Rep Power
    12
    Quote Originally Posted by Empathy View Post
    So he gave you the method. If that disables detection, look inside and see what it does when detected...? Then modify it based upon what you want. (You can change the key code to w.e you want or the code inside the brackets)
    I've already tested it and gave my response to what it does when changed. Please don't act like I haven't tried, If I knew how solve it, I'd do it. I never ask for help unless it's something that gets me completely stuck. I've attempted to help myself on this problem for days and haven't gotten anywhere. Go ahead a take a look, you won't find much:

    Code:
    void method3953(KeyEvent keyevent, int i, int i_4_) {
    		try {
    			int i_5_ = keyevent.getKeyCode();
    			if (i_5_ != 0) {
    				if (i_5_ >= 0 && i_5_ < anIntArray7704.length) {
    					i_5_ = anIntArray7704[i_5_];
    					if (i == 0 && 0 != (i_5_ & 0x80))
    						i_5_ = 0;
    					else
    						i_5_ &= ~0x80;
    				} else
    					i_5_ = 0;
    			} else
    				i_5_ = 0;
    			if (i_5_ != 0) {
    				method3952(i, '\uffff', i_5_, -2128667292);
    				keyevent.consume();
    			}
    		} catch (RuntimeException runtimeexception) {
    			throw Class346.method4175(runtimeexception, new StringBuilder().append("acn.c(").append(')').toString());
    		}
    	}
    Reply With Quote  
     

  2. #12  
    Donator


    Join Date
    Jul 2011
    Posts
    570
    Thanks given
    135
    Thanks received
    142
    Rep Power
    291
    Quote Originally Posted by lilquickguy View Post
    I've already tested it and gave my response to what it does when changed. Please don't act like I haven't tried, If I knew how solve it, I'd do it. I never ask for help unless it's something that gets me completely stuck. I've attempted to help myself on this problem for days and haven't gotten anywhere. Go ahead a take a look, you won't find much:

    Code:
    void method3953(KeyEvent keyevent, int i, int i_4_) {
    		try {
    			int i_5_ = keyevent.getKeyCode();
    			if (i_5_ != 0) {
    				if (i_5_ >= 0 && i_5_ < anIntArray7704.length) {
    					i_5_ = anIntArray7704[i_5_];
    					if (i == 0 && 0 != (i_5_ & 0x80))
    						i_5_ = 0;
    					else
    						i_5_ &= ~0x80;
    				} else
    					i_5_ = 0;
    			} else
    				i_5_ = 0;
    			if (i_5_ != 0) {
    				method3952(i, '\uffff', i_5_, -2128667292);
    				keyevent.consume();
    			}
    		} catch (RuntimeException runtimeexception) {
    			throw Class346.method4175(runtimeexception, new StringBuilder().append("acn.c(").append(')').toString());
    		}
    	}
    method3952(i, '\uffff', i_5_, -2128667292);

    Check what this method does. i_5 is your key code. No offense but this is simple java basics, and that was what I was referring to with my previous comment based upon the information you gave.

    I suggest using khan academy to learn more about Java and OOP.
    Reply With Quote  
     

  3. #13  
    Registered Member
    Join Date
    Jul 2013
    Posts
    181
    Thanks given
    3
    Thanks received
    12
    Rep Power
    12
    Quote Originally Posted by Empathy View Post
    method3952(i, '\uffff', i_5_, -2128667292);

    Check what this method does. i_5 is your key code. No offense but this is simple java basics, and that was what I was referring to with my previous comment. I suggest using khan academy to learn more about Java and OOP.
    I'm perfectly fine with server sided things. I have never had a need to edit the client in such a way, however. Logically, it's not surprising I'm not understanding this stuff because I've never seen it.

    This is what that method links to. Tells me nothing really.

    Code:
    void method3952(int i, char c, int i_1_, int i_2_) {
    		try {
    			Class298_Sub43 class298_sub43 = new Class298_Sub43();
    			((Class298_Sub43) class298_sub43).anInt6506 = i * -492671955;
    			((Class298_Sub43) class298_sub43).aChar6510 = c;
    			((Class298_Sub43) class298_sub43).anInt6508 = i_1_ * 666762723;
    			((Class298_Sub43) class298_sub43).aLong6509 = Class122.method1319((byte) 1) * -6780259989437506341L;
    			((Class323_Sub1) this).aClass453_7710.method5935(class298_sub43, -134660083);
    		} catch (RuntimeException runtimeexception) {
    			throw Class346.method4175(runtimeexception, new StringBuilder().append("acn.g(").append(')').toString());
    		}
    	}
    Reply With Quote  
     

  4. #14  
    Donator


    Join Date
    Jul 2011
    Posts
    570
    Thanks given
    135
    Thanks received
    142
    Rep Power
    291
    So int_1 is your key code. anInt6508 is being set to int_1 meaning anInt6508 is now your key code. I suggest doing some renaming.

    Now method5935 is what you need to checkout next: ((Class323_Sub1) this).aClass453_7710.method5935(class298_sub43, -134660083);
    Reply With Quote  
     

  5. #15  
    Registered Member
    Join Date
    Jul 2013
    Posts
    181
    Thanks given
    3
    Thanks received
    12
    Rep Power
    12
    Quote Originally Posted by Empathy View Post
    So int_1 is your key code. anInt6508 is being set to int_1 meaning anInt6508 is now your key code. I suggest doing some renaming.

    Now method5935 is what you need to checkout next: ((Class323_Sub1) this).aClass453_7710.method5935(class298_sub43, -134660083);
    Code:
    public void method5935(Class298 class298, int i) {
    		try {
    			if (null != class298.aClass298_3189)
    				class298.method2839(-1460969981);
    			class298.aClass298_3189 = aClass298_5643.aClass298_3189;
    			class298.aClass298_3187 = aClass298_5643;
    			class298.aClass298_3189.aClass298_3187 = class298;
    			class298.aClass298_3187.aClass298_3189 = class298;
    		} catch (RuntimeException runtimeexception) {
    			throw Class346.method4175(runtimeexception, new StringBuilder().append("sr.f(").append(')').toString());
    		}
    	}
    Reply With Quote  
     

  6. #16  
    Banned

    Join Date
    Jul 2011
    Posts
    1,767
    Thanks given
    493
    Thanks received
    425
    Rep Power
    0
    Just keep debugging and you will eventually find what you need. Afterwards, you can create a custom packet to handle a players fkeys or just handle it within the client itself
    Reply With Quote  
     

  7. #17  
    Registered Member
    Join Date
    Jul 2013
    Posts
    181
    Thanks given
    3
    Thanks received
    12
    Rep Power
    12
    Quote Originally Posted by _hassan View Post
    Just keep debugging and you will eventually find what you need. Afterwards, you can create a custom packet to handle a players fkeys or just handle it within the client itself
    Most likely not. I don't know how to do that. As far as debugging, again, not sure why it's not obvious at this point; I don't know what in the world I'm doing in regards to client code. There is no debugging for me. Unless someone is kind enough to tell me what exactly the spot I'm needing to make the edit is, it won't happen because I have absolutely zero idea as to what I'm even looking at or what I'm looking for.

    Edit: Not trying to sound like I need to be spoonfed answers. It is frustrating that I just want one simple thing done, and I don't have the ability to do it. I've spent 2 years of on/off development on my source and I have made things that I wouldn't have been able to do at the beginning, but this one thing is out of my abilities and will stay that way. I simply don't have the time or knowledge to figure this one out.
    Reply With Quote  
     

  8. #18  
    Registered Member

    Join Date
    Jul 2013
    Posts
    119
    Thanks given
    12
    Thanks received
    50
    Rep Power
    83
    Quote Originally Posted by lilquickguy View Post
    Most likely not. I don't know how to do that. As far as debugging, again, not sure why it's not obvious at this point; I don't know what in the world I'm doing in regards to client code. There is no debugging for me. Unless someone is kind enough to tell me what exactly the spot I'm needing to make the edit is, it won't happen because I have absolutely zero idea as to what I'm even looking at or what I'm looking for.

    Edit: Not trying to sound like I need to be spoonfed answers. It is frustrating that I just want one simple thing done, and I don't have the ability to do it. I've spent 2 years of on/off development on my source and I have made things that I wouldn't have been able to do at the beginning, but this one thing is out of my abilities and will stay that way. I simply don't have the time or knowledge to figure this one out.
    That client is obfuscated. Why would any real dev want to develop in an obfuscated code base? You have the time to mess around with private servers, you definitely have time to learn.

    Most IDEs have debuggers. Learn to use em brotha.
    Reply With Quote  
     

  9. #19  
    Banned

    Join Date
    Jul 2011
    Posts
    1,767
    Thanks given
    493
    Thanks received
    425
    Rep Power
    0
    Quote Originally Posted by lilquickguy View Post
    Most likely not. I don't know how to do that. As far as debugging, again, not sure why it's not obvious at this point; I don't know what in the world I'm doing in regards to client code. There is no debugging for me. Unless someone is kind enough to tell me what exactly the spot I'm needing to make the edit is, it won't happen because I have absolutely zero idea as to what I'm even looking at or what I'm looking for.

    Edit: Not trying to sound like I need to be spoonfed answers. It is frustrating that I just want one simple thing done, and I don't have the ability to do it. I've spent 2 years of on/off development on my source and I have made things that I wouldn't have been able to do at the beginning, but this one thing is out of my abilities and will stay that way. I simply don't have the time or knowledge to figure this one out.
    yes the client is heavily obfuscated and even I have a hard time figuring out what the stuff means but that's where debugging comes in and that's where you can see what lines of code do when you execute them in client

    thats how I found the fkeys disable thing above
    Reply With Quote  
     

  10. #20  
    Registered Member

    Join Date
    Feb 2010
    Posts
    715
    Thanks given
    133
    Thanks received
    378
    Rep Power
    550
    Widget defs have hotkeys in them, here is all the information you need to remove/edit it
    Each tab component will have a hotkey defined for option 1 with the specific fkey
    Code:
    	int accessMask = buffer.getUMedium();
    		int hotkeyFlags = buffer.getUByte();
    		if (hotkeyFlags != 0) {
    			hotKeys = new byte[11];
    			hotkeyModifiers = new byte[11];
    			hotkeyInterval = new int[11];
    			for (/**/; hotkeyFlags != 0; hotkeyFlags = buffer.getUByte()) {
    				int index = (hotkeyFlags >> 4) - 1;
    				hotkeyFlags = buffer.getUByte() | hotkeyFlags << 8;
    				hotkeyFlags &= 0xfff;
    				if (hotkeyFlags == 4095) {
    					hotkeyFlags = -1;
    				}
    				byte b_23_ = buffer.getByte();
    				if (b_23_ != 0) {
    					aBoolean4802 = true;
    				}
    				byte mod = buffer.getByte();
    				hotkeyInterval[index] = hotkeyFlags;
    				hotKeys[index] = b_23_;
    				hotkeyModifiers[index] = mod;
    			}
    		}
    		widgetName = buffer.getString();
    There are also CS2 opcodes to manipulate them, but they are not used in 667

    Here is how it's triggered in mouse/keyboard input handling
    Code:
     if (widget.hotKeys != null && !GLXToolkit.isConsoleOpen(-6279)) {
                                for (int i_88_ = 0; i_88_ < widget.hotKeys.length; i_88_++) {
                                    if (!DummyClass175.keyListener.isHoldingKey(widget.hotKeys[i_88_])) {
                                        if (widget.hotkeyRepeatAt != null) {
                                            widget.hotkeyRepeatAt[i_88_] = 0;
                                        }
                                    } else if (widget.hotkeyRepeatAt == null || DummyClass174.UPDATE_CYCLE >= widget.hotkeyRepeatAt[i_88_]) {
                                        byte requiredModifier = widget.hotkeyModifiers[i_88_];
                                        if (requiredModifier == 0 || ((requiredModifier & 0x8) == 0 || !DummyClass175.keyListener.isHoldingKey(86) && !DummyClass175.keyListener.isHoldingKey(82) && !DummyClass175.keyListener.isHoldingKey(81)) && ((requiredModifier & 0x2) == 0 || DummyClass175.keyListener.isHoldingKey(86)) && ((requiredModifier & 0x1) == 0 || DummyClass175.keyListener.isHoldingKey(82)) && ((requiredModifier & 0x4) == 0 || DummyClass175.keyListener.isHoldingKey(81))) {
                                            if (i_88_ < 10) {
                                                UnknownGraphicsClass2_Sub1.clickedWidgetContextMenu(-73, widget.UID, -1, "", i_88_ + 1);
                                            } else if (i_88_ == 10) {
                                                TextureComponent_Sub23.method2863(-19316);
                                                AccessMask node_sub35 = getAMask(widget);
                                                TextureComponent_Sub18.method2846(node_sub35.getBit11To17(-25), (byte) -108, widget, node_sub35.requiredAttribute);
                                                ClippingPlane.aString1148 = NewsFeedRenderDefinition.getSelectedOption(widget, (byte) -104);
                                                if (ClippingPlane.aString1148 == null) {
                                                    ClippingPlane.aString1148 = "Null";
                                                }
                                                LoadingScreenAbstractProgressBar.topLeftActionNameIThink = widget.widgetName + "<col=ffffff>";
                                            }
                                            int delay = widget.hotkeyInterval[i_88_];
                                            if (widget.hotkeyRepeatAt == null) {
                                                widget.hotkeyRepeatAt = new int[widget.hotKeys.length];
                                            }
                                            if (delay == 0) {
                                                widget.hotkeyRepeatAt[i_88_] = 2147483647;
                                            } else {
                                                widget.hotkeyRepeatAt[i_88_] = DummyClass174.UPDATE_CYCLE + delay;
                                            }
                                        }
                                    }
                                }
                            }
    So all it does it simulate a mouse click on the button

    Client also uses it own java -> internal keycode mapping
    Code:
    	static int[] keycodes = { 0, 0, 0, 0, 0, 0, 0, 0, 85, 80, 84, 0, 91, 0, 0, 0, 81, 82, 86, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 83, 104, 105, 103, 102, 96, 98, 97, 99, 0, 0, 0, 0, 0, 0, 0, 25, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 0, 0, 0, 0, 0, 0, 48, 68, 66, 50, 34, 51, 52, 53, 39, 54, 55, 56, 70, 69, 40, 41, 32, 35, 49, 36, 38, 67, 33, 65, 37, 64, 0, 0, 0, 0, 0, 228, 231, 227, 233, 224, 219, 225, 230, 226, 232, 89, 87, 0, 88, 229, 90,
     1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
     0, 0, 0, 101, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
    static final void setKeyCodes() {
    		if (SignLink.javaVendor.toLowerCase().indexOf("microsoft") == -1) {
    			TextureComponent_Sub24.keycodes[92] = 74;
    			TextureComponent_Sub24.keycodes[47] = 73;
    			TextureComponent_Sub24.keycodes[46] = 72;
    			TextureComponent_Sub24.keycodes[44] = 71;
    			TextureComponent_Sub24.keycodes[45] = 26;
    			if (SignLink.setFocusTraversalKeysEnabled == null) {
    				TextureComponent_Sub24.keycodes[192] = 58;
    				TextureComponent_Sub24.keycodes[222] = 59;
    			} else {
    				TextureComponent_Sub24.keycodes[222] = 58;
    				TextureComponent_Sub24.keycodes[192] = 28;
    				TextureComponent_Sub24.keycodes[520] = 59;
    			}
    			TextureComponent_Sub24.keycodes[93] = 43;
    			TextureComponent_Sub24.keycodes[91] = 42;
    			TextureComponent_Sub24.keycodes[59] = 57;
    			TextureComponent_Sub24.keycodes[61] = 27;
    		} else {
    			TextureComponent_Sub24.keycodes[191] = 73;
    			TextureComponent_Sub24.keycodes[186] = 57;
    			TextureComponent_Sub24.keycodes[219] = 42;
    			TextureComponent_Sub24.keycodes[223] = 28;
    			TextureComponent_Sub24.keycodes[192] = 58;
    			TextureComponent_Sub24.keycodes[189] = 26;
    			TextureComponent_Sub24.keycodes[222] = 59;
    			TextureComponent_Sub24.keycodes[188] = 71;
    			TextureComponent_Sub24.keycodes[187] = 27;
    			TextureComponent_Sub24.keycodes[220] = 74;
    			TextureComponent_Sub24.keycodes[221] = 43;
    			TextureComponent_Sub24.keycodes[190] = 72;
    		}
    	}
    Reply With Quote  
     

  11. Thankful user:


Page 2 of 3 FirstFirst 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Key Actions [Creating Custom Packet]
    By dan0194 in forum Snippets
    Replies: 9
    Last Post: 08-19-2014, 05:57 AM
  2. Function Keys galkons client
    By Hiken jr in forum Help
    Replies: 0
    Last Post: 09-07-2013, 07:37 PM
  3. Combat Interface & Action Keys
    By .alycia in forum Show-off
    Replies: 51
    Last Post: 05-07-2013, 01:31 PM
  4. Function Keys
    By Ashley in forum Help
    Replies: 0
    Last Post: 10-24-2012, 01:39 AM
  5. Function Key Changing
    By leojwinter [Jake] in forum Help
    Replies: 4
    Last Post: 03-16-2012, 09:43 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •