On the reMarkable tablet you can access the linux firmware directly, which should make this kind of use possible without dropping other functionality.
See for instance this post by Nick Temple: https://nicktemple.com/blog/remarkable-keyboard/
See for instance this post by Nick Temple: https://nicktemple.com/blog/remarkable-keyboard/