Weaving, Sticky Keys, NKRO and You

by will (lostara)

What do I mean by "Weaving"?

Throughout this page I am going to talk about "weaving". I am a Kanna main, so when I say weaving, I mean being able to interweave Shikigami Haunting and Tengu Strike. Weaving, however, does not specifically benefit Kannas. Illiums weave together their main attacks. Shadowers can weave Assassinate and Meso Explosion. Beast Tamers can weave to achieve insane movement as Leopard, as seen in this video from Dubsly. I am using "weaving" to simply mean "being able to hold two keys and have them both repeat simultaneously". Many other classes besides the ones I just mentioned can benefit from understanding, and being able to weave.

Sticky Keys

The most common method people use to weave their skills is Sticky Keys. Sticky Keys is a built in windows utility that is meant to let users press key combos such as Control Alt Delete one key at a time.

However, Sticky Keys can be used to weave your attacks. This is done by putting one skill on a modifier key (Shift, Alt, Control), and additional skills on alphanumeric keys. By holding the modifier and the correct alphanumeric keys, Windows will press and hold the modifier, press the additional keys one by one, then release the modifier. It will continue to do this until you let go of the keys. This results in each of your skills being pressed one by one, over and over, and thus creates the desired weaving your skills.

You can find a tutorial to setting up Sticky Keys here, made by Formosa.

NKRO and Mechanical Keyboards

Now we get to the crux of the issue, and my reasons for making this page. I see a lot of people saying "If you get a mechanical keyboard, you can weave without Sticky Keys", or "If you get a keyboard with NKRO, you can weave without Sticky Keys". This is NOT true.

tl;dr The Ability to weave is dependent on how the keyboard is designed/programmed and nothing else. You cannot tell from the box/marketing. The best way to get a keyboard that can weave is to buy one someone else has already purchased and has confirmed has the ability to do so.

Mechanical vs Traditional

Mechanical keyboards are the same as rubber dome keyboards, just with different switches. There is nothing magical about a mechanical switch that allows you to weave. They are both simply completing a circuit when pressed. However, as we will explore later, the fact that mechanical keyboards are often more expensive and have more advanced firmware could be where "mechanical = weave" idea comes from.

NKRO

A keyboard supporting NKRO does not automatically mean it can weave. If strictly adhering to the HID spec, the maximum number of keypresses the keyboard can report at one time is 6 keycodes and 8 modifiers, the modifiers being Left and Right Shift, Control, Alt, and Windows. If more than the 6 keys are pressed, then the additional keypresses will simply be discarded. NKRO is the keyboard manufacturer giving the keyboard the ability to press more than those 6+8 keys at once. NKRO is not a standard, so the way that it is implemented can vary from manufacturer to manufacturer, even model to model.

The easiest and most common way is to simply expand the report size and allow each report to contain more than 6 keys. The downside to this is that it can sometimes cause the keyboard to not work in the BIOS. Bypassing the 6 key rollover limit in this way does nothing for the keyboard in terms of weaving ability.

If a single keyboard can only press 6 key at a time, why not just use two keyboards to press 12 keys at once? This is another method of bypassing the 6 key rollover limit. Some keyboards will identify themselves to the operating system as two or more keyboards (referred to as endpoints). When you press a key, the keyboard decides which of the endpoints is going to send the keypress. If you have the first endpoint pressing one key, and the second endpoint pressing a different key, they will repeat simultaneously, resulting in weaving. So this method of NKRO DOES result in the keyboard being able to weave, but it is not very common to find a keyboard that does this. With modern BIOS being able to handle larger key report sizes, most manufacturers will simply chose that as their preferred NKRO method nowadays.

Now that we have established that having NKRO or having mechanical switches do not automatically allow you to weave, how DO some keyboards do it?

Actually Weaving

HID Report Descriptor

When your keyboard reports a keypress or series of keypresses, the data is communicated to the operating system through something called a Report descriptor. This Report is a standard, defined in the HID (Human Interface Device) spec.

The report is 8 bytes long, and looks like this:
Byte 0 1 2 3 4 5 6 7
Description Modifiers Reserved Keycode 0 Keycode 1 Keycode 2 Keycode 3 Keycode 4 Keycode 5
Example: the key report for someone pressing the Q key (keycode 0x14) would look like: 00 00 14 00 00 00 00 00
Example: the key report for someone pressing the R key (keycode 0x15) would look like: 00 00 15 00 00 00 00 00
Example: the key report for someone pressing the Q and R keys would look like: 00 00 14 15 00 00 00 00

More information on the HID report descriptors can be found here, but the above should be enough for our purposes.

Pressing Multiple Keys at Once

Lets say you press and hold the R key. This key will repeat as long as you hold it. What happens if, while still holding down R, you press Q? The R key will stop repeating, and the Q key will start repeating. Even though both keys are held, the only key that will be repeated/typed is the LAST key you pressed.

In terms of Maplestory, this means if you are holding down one skill, and press another skill, you will stop casting the first skill and instead cast the second one. If we want to weave, we want to be repeating BOTH skills. So how do we do this?

First lets take a step back and examine what the Report descriptor looks like in the above scenario. At first, with no keys pressed, our report looks like this 00 00 00 00 00 00 00 00. Then we press R, and the keyboard sends the operating system this report: 00 00 15 00 00 00 00 00. Then we press Q and send 00 00 15 14 00 00 00 00. Again, this results in us repeating solely the Q key. If we want to repeat BOTH keys, we instead must go directly from 00 00 00 00 00 00 00 00 to 00 00 15 14 00 00 00 00. Since the operating system will repeat the LAST KEY OR KEYS pressed, if we go directly from nothing pressed to Q AND R pressed, both will the be LAST key(s) pressed and BOTH will repeat, resulting in weaving.

So How Does That Happen?

This is why weaving is dependent on how the keyboard is designed. A keyboard is essentially a matrix, and hundreds of times a second, the keyboard polls the matrix to see what has been pressed. This means over and over and over, it asks "Is anything pressed on the first row?" "Is anything pressed on the second row?" and so forth. If some thing is pressed, when it asks "Is something on the first row pressed?" it will get an answer like "Yes, the second column is pressed". The keyboard then knows, "Ok, the first row second column is the 'W' key, I will tell the operating system the 'W' key has been pressed".

If the keyboard reports each key as being pressed as soon as it discovers it, that keyboard is incapable of weaving. This is because it will always report the keys one at a time, and never be able to report 2 keys at once. In our above example, with a keyboard designed in this manner, the reports will ALWAYS look like this: 00 00 00 00 00 00 00 00, 00 00 15 00 00 00 00 00, 00 00 15 14 00 00 00 00, and you will never have the last report being two keys pressed at the same time, resulting in only one key repeating.

If the keyboard polls the entire keyboard looking for keys to be pressed, then sends them all at once, then that keyboard is capable of weaving. Keyboards like this will look over every single row, see what is pressed, and instead of telling the operating system immediately, will "save up" this keypresses until it has checked the entire keyboard, then send them all in one report. In our above example this means the key reports go from 00 00 00 00 00 00 00 00 to 00 00 15 14 00 00 00 00 and you will see both keys repeating at once, and you will weave. Depending on how fast the keyboard polls its matrix, the window you have for pressing two keys at the same time to get them into the same Report will shrink, with the faster polling keyboards being harder to time.

As you can probably surmise, this is not a feature that you will see on any marketing material, or on the keyboards box. After all it is not really a "feature", just a side effect of how the keyboard was designed. It has nothing to do with NKRO, and can coexist with NKRO without affecting it in any way. The only way of knowing if a keyboard is designed like this is to get a hold of one and to try pressing two keys at the same time and seeing what happens. If you are able to press two keys at once, and see them both repeat, then you are able to weave.

Known Weaving Keyboards

These keyboards are ones that have been confirmed by the community to allow you to weave. If you have one not listed that allows you to do it, let me know and I will add it to the list.