Logitech 345 is 45cm long, so a 40 cm long keyboard will fit. I dont use the num pad but use the arrow keys one without numpad but with arrow keys is not available in my search so far.Portability vs Size .. you get to choose one. What are your laptop bag dimensions ?
Having said that, these exist -
RtnSparsh Foldable Silicone Keyboard | USB Wired Waterproof Rollup Keyboard, Slim & Portable Flexible Design for Soft Silent Typing on PC, Notebook & Laptop | Ideal for Travel & Home
https://amzn.in/d/aoKSpza
Omikamo Foldable Bluetooth Keyboard with Numeric Keypad, Wireless Travel Keyboard Supports Multi-Device Connection, Full-Size Portable Keyboard for Windows/iOS/Android/Mac (Can Be Used on Knees)
https://amzn.in/d/3Ix8BPm
I have no idea about the quality of these so do your own research.
Ah.. then the K230 mentioned above should be fine..Logitech 345 is 45cm long, so a 40 cm long keyboard will fit. I dont use the num pad but use the arrow keys one without numpad but with arrow keys is not available in my search so far.