PS/2 BARCODE SCANNER INTERFACING

Hi.
For the MCR12 Clock pin you must use Arduino Uno R3 pins 2 or 3 (that are INT0 and INT1 pins), no others.
Use the PS2Keyboard library 2.4 PS2Keyboard Library, Connect a keyboard for user input
Try this sketch:

#include <PS2Keyboard.h>

const int DataPin = 3;
const int IRQpin =  2;

PS2Keyboard keyboard;

void setup() {
  keyboard.begin(DataPin, IRQpin);

  delay(1000);
  Serial.begin(9600);
  Serial.println("Keyboard Test:");  
}

void loop() {
  if (keyboard.available()) {

    char c = keyboard.read();
    
    if (c == PS2_ENTER) {
      Serial.println();
    } else {
      Serial.print(c);
    }

  }
}