Apple magic keyboard weird behavior I connected Apple's magic keyboard to an iPhone 7 and started to experiment if I can take it with me on a journey. 

I soon realized that it does not have any special characters to my language. I started to search for a button that alters the letters to get those special chars (alt + letters; cmd + letters). After a while I discovered some strange behaviors of this keyboard:


I can not type capital T with left Shift. 
Backspace works as delete button (removes text from right side of cursor).
Right and left arrows works as HOME and END buttons.


Also I noticed that arrow keys and backspace works if I reconnect with device. Whenever I hit left SHIFT + T the phone opens dropdown menu to select onscreen keybord type (Emoji and two other options). After this again arrows and backspace does not work.

My guess is that I accidentally activated some mode to get a Latvian layout and now need to reverse that. Any way to fix this?

Keyboard model: A1314

Also I found a whole thread where people have exactly the same problem, but no solutions for years: https://discussions.apple.com/thread/3357507
I'm going to defer to people like @nohillside and @Tom Gewecke for internationalization and keyboard setups, but you can rule out a factory reset of Apple bluetooth devices quite quickly assuming you have a Mac computer you can borrow and pair to the keyboard in question.


Enable Bluetooth in the menu bar
Hold Shift and Option keys when you click on Bluetooth icon (and you can let go of the modifier keys once the menu is visible).
Choose Debug - Factory reset all connected Apple devices or choose the specific device - navigate to the sub menu and choose Factory Reset


I'm guessing this is less than 50% your issue, but if it does - you'll be set (or have fewer items to chase down) and know how to reset Apple Bluetooth devices.