**System Information**
Operating system: Windows 10
Graphics card: Nvidia GTX 1070
**Blender Version**
Broken: 2.83-3.0
**Short description of error**
Sometimes, duplicate keymap entries can lead to both entries being discarded. This is especially apparent for the selection hotkeys. In this case, using X-ray selection tools, the modal keys canboth be removed, despite there being no apparent reason as to why both are removed. I don't know another way to reproduce this behaviour without the addon, because I don't know where else this occurred, though I have seen it appear on other similar keymap entries.
**Steps to reproduce**
1. Go to Edit>preferences
3. Install the addon X-ray selection tools from this link: https://captain-cirno.gumroad.com/l/DaLdj
2. Go to Edit preferences > keymap & search for "box select x-ray"
{F12787511}
3. If there are not as many entries, try to disable and enable the addon a couple times, or add entries manually, see below:
3. Set the first item to Set selection, no modifiers and tweak input
4. Set the second item to expand selection, with ctrl as modifier and tweak input
5. Set the third item to subtract selection with alt as modifier and tweak input
6. Set the fourth item to intersect selection with ctrl+shift as modifiers and tweak input
7. Add multiple dummy entries with different settings than the ones above. Vary the modifiers for a certain selection mode (i.e. add ctrl to subtract selection and ctrl+alt for intersect selection, etc.)
8. Gradually go over all the dummy entries and try to set them as either 3,4,5,6 Also, be mindful of the wait for input checkbox, make sure it is set the same for duplicate entries, this is a condition for their mutual removal. Meaning,; if the settings are not the samethese should be automatically populated when creating a new custom keymap, neither one willbut can also be removed to begin withadded manually.
8. Gradually go over all the dummy entries, while leaving the entries from step 4,5,6,7 in-tact. For the dummy entries, disable the selection mode and remove the modifier keys by hitting the "Any" button twice.
9. Notice that the result is that there are either less entries than the ones that should be left untouched and/ or that the ones left untouched were altered due to the items jumping in the list. On other occassions, Notice that the result is that there are lessduplicate entries than the four one would expect there to beare not merged.
**Expectation**
The modifiers should only be removed to the point where the only remaining keymap entries are from step 3,4,5,6 and those that are different from these.
However, this is not the case.
{F12788306}
Furthermore, I don't expect the entries to jump around in the list. This also occurs when changing the keymap without an active search.
{F12788297}
In addition, I expect duplicate entries to be merged, since that's what happens for regular keymap items.
-Add screencast-{F12788291}
**Related problem to keymap 'corruption':**
https://developer.blender.org/T94606