help me with this program master and slave module

Hi, my name is Richard,
I am new to programming…Recently I came up with a project for my gamepad. I want to make it using two HC-05 Bluetooth module. I am trying to make it when button press, Letter ‘A’ or ‘B’ will show on my laptop monitor as in the laptop’s keyboard do. I use Arduino Uno on master side and Leonardo on the slave side…momentarily I use two pullup button as a start…but when I press one of the buttons both letter A and B came out simultaneously,
I want to make it one button press letter ‘A’ will come out and when I press the other button letter ‘B’ will come out…but I failed…both came out at the same time or one of the buttons doesn’t show any output on my monitor…So please me solve these coding problems. I really appreciate it if you could help me with the program…As I am still a beginner…I really want to make it work. because my nephew can’t wait to play his hand on it to play games. Thank you

Here my master code,

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11);

const int buttonPin = 2;
const int buttonPin1 = 3;
int buttonState = 0;
int buttonState1 = 0;
void setup() {

Serial.begin(9600);
mySerial.begin(38400);

pinMode(buttonPin, INPUT_PULLUP);
pinMode(buttonPin1, INPUT_PULLUP);
}

void loop() {

int buttonState = digitalRead(buttonPin);
int buttonState1 = digitalRead(buttonPin1);

if (buttonState == HIGH) {

mySerial.write(‘1’);
delay(100);
}
else if (buttonState == LOW) {
mySerial.write(‘0’);
delay(100);
}
if(buttonState1 == HIGH) {

mySerial.write(‘1’);
delay(100);
}
else if (buttonState == LOW) {
mySerial.write(‘0’);
delay(100);

}
}

and here is my slave code:

#include <SoftwareSerial.h>
#include <Keyboard.h>
SoftwareSerial mySerial(10, 11);

int buttonPin = 2;
int buttonPin1 = 3;

void setup() {

Serial.begin(9600);
mySerial.begin(38400);
Keyboard.begin();

pinMode(2, OUTPUT);
pinMode(3, OUTPUT);

}

void loop() {

if (mySerial.available() > 0) {
buttonPin = mySerial.read();

}

if (buttonPin == ‘0’) {
digitalWrite(2, LOW);
Keyboard.write(65);
delay(30);
}
else

digitalWrite(2, HIGH);
delay(30);

if (mySerial.available() > 0) {
buttonPin1 = mySerial.read();
}
if (buttonPin1 == ‘0’) {
digitalWrite(3, LOW);
Keyboard.write(66);
delay(30);
}
else

digitalWrite(3, HIGH);
delay(30);
}

Please read this topic Read this before posting a programming question then Auto format it in the IDE and add code tags around your code in the original post to make it easier to copy to an editor