Changing variable value with switches

I am going to use an HC-12 module to send numeric data - e.g. mySerial.println(1111)

I want to send 9 values individually as control codes to be dealt with in the receiver, controlling a camera pan left, pan right, tilt up, tilt down plus 5 OSD settings.

I could use 9 pushbuttons to 9 Arduino pins but sure this is wasteful. Only alternative I can think of is using a joystick that stays where it's left, i.e not return to zero, plus 5 pushbuttons utilizing a resistor chain where I can look at ADC values.

Are there any other ways to make 5 or 9 pushbuttons create a value to put into mySerial.println(value)

Thanks

Up to 8 can easily be handled using a HC165 IC (like a 595 but for input) connected using SPI.

Otherwise you can get up to a hundred using a couple of pins with a bit of extra hardware - see https://arduinoplusplus.wordpress.com/2016/02/17/up-to-100-switches-with-3-digital-pins/

Many thanks marco_c, excellent, new to me. Regards