Keyboard hotkey

Hello , i have code below that is supposed to take the inpuit of a button and i am able to program this button to do something like lock my desktop, but my code isnt compiling. Here is my code-

#include <Keyboard.h>
#define KEY_PIN   2

static void KeyDown(void)
{
  Keyboard.press(KEY_LEFT_GUI);
  Keyboard.press(‘l’);
}

void setup(void)
{
  Keyboard.begin();

  pinMode(KEY_PIN, INPUT);
  digitalWrite(KEY_PIN, HIGH);
}

void loop(void)
{
  static uint8_t buttonStateLast = 0;
  uint8_t buttonState;

  buttonState = digitalRead(KEY_PIN);

  if (buttonState != buttonStateLast) {
    buttonStateLast = buttonState;

    if (buttonState == 0) {
      KeyDown();
      delay(100);
      Keyboard.releaseAll();
    }
  }
  delay(50);
}

and here is my error code

Arduino: 1.8.12 (Windows Store 1.8.33.0) (Windows 10), Board: "Arduino Leonardo"

HID_hotkey_windows:15:18: error: stray '\342' in program

   Keyboard.press(‘l’);

                  ^

HID_hotkey_windows:15:19: error: stray '\200' in program

   Keyboard.press(‘l’);

                   ^

HID_hotkey_windows:15:20: error: stray '\230' in program

   Keyboard.press(‘l’);

                    ^

HID_hotkey_windows:15:22: error: stray '\342' in program

   Keyboard.press(‘l’);

                      ^

HID_hotkey_windows:15:23: error: stray '\200' in program

   Keyboard.press(‘l’);

                       ^

HID_hotkey_windows:15:24: error: stray '\231' in program

   Keyboard.press(‘l’);

                        ^

C:\Users\tjone\OneDrive\Desktop\Arduino\Arduino uno code\HID_hotkey_windows\HID_hotkey_windows.ino: In function 'void KeyDown()':

HID_hotkey_windows:15:21: error: 'l' was not declared in this scope

   Keyboard.press(‘l’);

                     ^

exit status 1
stray '\342' in program

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This is caused by the use of "fancy quotes" in the code. The forum replaced them with standard single quotes, but I can see from the email notification I got that they are used in your code.

You will often get this sort of issue when copying code that was posted online because some publishing platforms (e.g., blog software) automatically "prettify" the text with these stupid fancy quotes. Some word processing software also does this.

Since the forum replaced the fancy quotes, you can fix the problem by copying the code you posted above from the forum back to your sketch. I just compiled it without any errors.

pert:
This is caused by the use of "fancy quotes" in the code. The forum replaced them with standard single quotes, but I can see from the email notification I got that they are used in your code.

You will often get this sort of issue when copying code that was posted online because some publishing platforms (e.g., blog software) automatically "prettify" the text with these stupid fancy quotes. Some word processing software also does this.

Since the forum replaced the fancy quotes, you can fix the problem by copying the code you posted above from the forum back to your sketch. I just compiled it without any errors.

you're right. Thanks

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per