Is the keyboard layout QWERTY proprietary? Can one use it in their own keyboard apps without buying a license? If no, are there any non-proprietary keyboard layouts?
Keyboard layouts can be patentable inventions. But the relevant typewriter patents are >140 years old and have long expired. So QWERTY is effectively public domain.
However, novel smartphone input methods are still patented. E.g. the technique of swiping is still patented until at least 2024.
Some Keyboard layouts are explicitly open source. I use the EURkey layout which is GPL-licensed. That doesn't make patents impossible per se, but makes it possible to implement the layout freely regardless of which patents the layout's author might hold. Of course, EURkey is itself a keyboard layout based on QWERTY.
: The paper On the prehistory of QWERTY suggests that an early version of this layout appeared in US patent 207559, but I can't find it in that document. The patent describes technical workings of a typewriter, it probably wouldn't have occurred to the inventor at the time to also patent a particular arrangement of keys.