Connecting it directly in a VGA output, it will bridge and convert the RGB signals to a passive equivalent luminance value with a few resistors, then you just have to select the monochrome output by combining the primary colors red, green and blue using the some buttons.
The luminance is calculated passively and approximately to the following formula:
0.2126*R + 0.7152*G + 0.0722*B
The schottky diodes are intended to prevent the RGB signal from going back and mixing when the switch is selected in color:
In the following video can be seen in operation. The color mode display is affected by poor lighting, where saturated colors are displayed. With this lighting I wanted to highlight the monochrome mode: