Arduino Pro Micro - switch off LEDs
Kind of.

You don't have to change pins_arduino.h.
Try the LED_BUILTIN_TX and the LED_BUILTIN_RX.
The pins are turned on and off by the code for the SerialUSB port. That can not be changed without changing the Arduino libraries. Setting that pin to INPUT in your sketch in the setup() function will turn them off:

pinMode(LED_BUILTIN_TX,INPUT);
pinMode(LED_BUILTIN_RX,INPUT);


If you have troubles with the LED_BUILTIN_TX and the LED_BUILTIN_RX, then you can use this as well:

bitClear(DDRD,5);
bitClear(DDRB,0);


The code for the SerialUSB port still writes to that pin, but once they are set as INPUT, that code will turn on and off the pullup resistor. That is no problem since those leds are connected to VCC.

To turn them on is also possible, but then those pins needs to be OUTPUT and LOW. They will not stay on when the SerialUSB port is used.