It's not quite pocketable, and it doesn't have a keyboard at all, but the Steam Deck has totally been that device for me. I've been really impressed with how good the controller mapping can be; set your joysticks to be Rotary macros, and combined with the huge number of buttons you have yourself a fantastic little chording keyboard. The built-in controller mapper supports keyboard layers and conditional output (eg, when in this section of GUI, output from button chord L3-R3 should be XYZ). Anybody using vim or tmux familiar with this modality should be comfortable. Also, the Rotary menu, should you choose to use it, can be labeled (including with emoji, if that's your jam), making the whole thing incredibly flexible.