Remove Weapons and Armors from Items menu

I found the following code to remove weapons and armors from the items menu.  It worked great for what I wanted it to do, but my character could suddenly walk through other people and cross things they weren't supposed to do.  I removed the script, and everything went back to normal - no walking on water or through solid objects.  Can anyone help me with a script that will remove the weapons and armor options but not have these "side effects"?

class Window_ItemCategory < Window_HorzCommand

  

  def col_max

    return 2

  end

  

  def make_command_list

    add_command(Vocab::item,     :item)

    add_command(Vocab::key_item, :key_item)

  end

  

end
There's nothing wrong with that code.

You sure you were not holding the Control key or something? Because that script can't possibly have that side effect.
Ok, you're right.  I'm not sure what's going on, but my computer is apparently crazy.  I have a Mac, so I've been logging in remotely to my work computer over the Christmas break to work on my game.  That's when I first noticed this issue, and I just got to work and "fixed" it - though my computer insisted that I was holding down the Control key for the first few clicks (getting into email, etc.)  I plugged this code back in and there aren't any issues anymore.  Odd... But thanks for the help!  It's good to know that's what the Control key does...

Original thread: https://forums.rpgmakerweb.com/threads/remove-weapons-and-armors-from-items-menu.35393/