add background and keyboard functions to TypeScript definitions