Help with defining the key in ardunio

Hi guys i have 1 question
I have ssd1306 i2c display and ardunio uno
I want to define a key to one of the bases of Arduino uno and display ssd1306 a text on my screen when this key is activated
Can anyone give me a sample code or example?
Thanks

I want the text to be displayed on my screen by connecting voltage to one of the ardunio pins. Clear the text from the screen when the voltage is cut off

I do think you need to specify what this “voltage” is and how you propose to connect it to the Arduino pin. Your terminology makes it unclear as to whether you comprehend the limitations on what you may connect to the Arduino. What is the source of this “voltage”?

What code have you used so far to successfully demonstrate on your SSD1306 display?

Paul__B:
I do think you need to specify what this "voltage" is and how you propose to connect it to the Arduino pin. Your terminology makes it unclear as to whether you comprehend the limitations on what you may connect to the Arduino. What is the source of this "voltage"?

What code have you used so far to successfully demonstrate on your SSD1306 display?

I fully understand the voltage limitations of the Arduino and now I started with the example code in the ssd1306 library