Both of your problems are arising from the start method of your Scene_Item.
First problem:
@key_window.visible = true
@key_window.active = true
That makes the key window visible and active when you open Scene_Item. The item window is already visible and active. Thus you have two separate windows, both visible and active. Turn those values to false and it will only show the Item window when you first enter the scene.
Second problem: @key_window = Window_Key.new(250, 70, 295, 280)
Note that the initialize method of Window_Key class has these arguments:
def initialize(x, y, width, height, relic=false)
Therefore, if you don't put a fifth argument when you create the window, relic (and therefore @relic) will be false. The following:
if @relic
next unless item.note.include?("KEY")
else
next if item.note.include?("KEY")
end
shows that when @relic is false, the window will draw only non-key items, while if @relic is true, it will only draw key items. What is happening in your scene is that you are not specifying that relic should be true when you create the window, and therefore it defaults to false. SO, to solve this problem is really easy, all you have to do is replace:
@key_window = Window_Key.new(250, 70, 295, 280)
with:
@key_window = Window_Key.new(250, 70, 295, 280, true)