Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8287479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:03:24+00:00 2026-06-08T12:03:24+00:00

if keyboard_check(‘D’) { x = x + 4 sprite_index = spr_playerRight } As soon

  • 0
if keyboard_check('D')
{
    x = x + 4
    sprite_index = spr_playerRight
}

As soon as I start the game, the player sprite will start moving to the right. But, as you can see, that shouldn’t be happening… right?

When I actually do press D, it does the (Else) portion of the little chunk.

Any idea why this is happening? I’m a bit new to this.

Edit: I was messing around a little and I swapped the code (the IF from the else) and I would not move at the start, but pressing any key would cause me to move.

Another Edit: The fact that the Else would apply any time the D key is not applied made me realize that (if this did work properly) the else on this would intrude on attempts to move other directions (Pressing any button will stop the movement)

Another Edit: I changed the keyboard_check to
keyboard_check(vk_right)
And it works perfectly fine. I believe this is simple a problem on how I declared the key… How do I declare keys properly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:03:27+00:00Added an answer on June 8, 2026 at 12:03 pm

    According to the documentation it should be:

    if keyboard_check(ord('D'))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can we change the keyboard language in iPhone from English to Japanese programatically?
i created persian custom keyboard , my letters type on UITextView , but the
I have an UITextView and I don't want check editable option, how can call
I have setup hudson to check out from my remote git repository but i
how can we check or change keyboard typing language from server or client side
My UITableViewCells can accept input of data. While working in one cell, it would
The below code will block all the keyboard shortcuts. Since i wanted to implement
How can we check that the selected keyboard is not English and it is
I just need a Batch command that can check if some key was pressed,
How can I check if the UIKeyboardTypeDecimalPad has a dot/comma? I need this to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.