This example demonstrates how to use the key encoder to convert key events into terminal escape sequences using the Kitty keyboard protocol.