I use plain LaTeX for research papers (which don't run without error in XeLaTeX) and XeLaTeX for presentations (which use fontspec). I am working with Kile and have a shortcut (Alt+2) for QuickBuild with PDFLaTeX which I am very accustomed to. Now I could easily choose a different Shortcut for a QuickBuild with XeLaTeX. However, I always accidentally push Alt+2 creating errors, which is a bit annoying.
Is there any way to have Kile recognize automatically which command should be used to build the current file? I'm fine with putting some document type declaration like "% use xelatex" at the beginning of the document if that helps.