title: Virtual keyboard opens automatically when closing charms/settings
body: <p>My application uses the virtual keyboard. The keyboard becomes hidden when the charms bar is opened, but it will always reappear when the charms bar is closed. I want to control whether it reappears or not.</p>
  
  <p>My program has several folders with editable files, and the virtual keyboard is used to edit the files. In the charm bar's 'Settings' selection I've added a control over which folders/files are displayed. The problem occurs when the user has the virtual keyboard open while editing a file, then goes to the charms bar to disable the folder that that file is in. I've coded things such that the file is closed when this happens, but once the user closes the charms the keyboard will automatically reopen... and let the user keep typing and altering the data! They can even finagle the file to re-open while its folder is disabled!</p>
  
  <p>I have read several other questions of a similar nature, but none of them have the added element of the charm bar. I think Windows 8 makes a note or flags the virtual keyboard to reopen when I open the charm bar while the keyboard is up, and telling the keyboard to close doesn't touch that flag (and anyway I can't tell it to close at a point when it's already closed).</p>
  
  <p>If I can figure out how to handle that hypothetical flag, or instead get some code to execute immediately after the keyboard reopens, I can get the rest of it to work. Any advice?</p>
  
  <p>UPDATE:</p>
  
  <p>I found a work-around: all keyboard input now goes through a filter that checks if the folder/file is still active, else ignore input. Not perfect but serviceable for my needs. Original question remains unanswered.</p>