  We establish a general, weighted Kohn-H\"ormander-Morrey formula twisted by a
pseudodifferential operator. As an application, we exhibit a new class of
domains for which the $\bar\partial$-Neumann problem is locally hypoelliptic.
