Search Results

Search found 4991 results on 200 pages for 'ps2 keyboard'.

Page 40/200 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Keyboard locking up in Visual Studio 2010, Part 2

    - by Jim Wang
    Last week I posted about looking into the keyboard locking up issue in Visual Studio.  So far it looks like not a lot of people have replied to provide concrete repro steps, which confirms my suspicion that this is somewhat of a random issue. So at this point, I have a couple of choices.  I can either wait for somebody in the community to provide a repro of the problem that I can reliably run into, or I can do the work myself. I’m going to do both, so while I’m waiting for more possible bug reports, I’m going to write a tool that models the behavior of a typical Visual Studio user and use that to hopefully isolate the problem. I’ve chosen to go with this path since given the information in the bug reports, it seems people hit the issue with many different configurations in many different scenarios.  This means that me sitting down without any solid repro steps is likely not going to be a good use of time.  Instead, I’m going to go with a model-based testing approach where I will define a series of actions that a user in VS can do, and then proceed to run my model.  I’ll let you guys know how this works out for isolating bugs :) I’m using an internal tool for the model engine and AutoIt for the UI automation (I want something lightweight for a one-off).  One of the challenges will be getting feedback: AutoIt is great at driving, but not so great at understanding what success and failure means.

    Read the article

  • Touchpad hardware button disables keyboard too

    - by jjg
    I have an old but nice Samsung X50 running MM which has a key between the touchpad buttons which disables the touchpad. Very nice, no-one like to brush against the touchpad while typing. It seems to be a hardware feature -- a BIOS style window appears at the top left of the screen when you press it saying "touchpad off"; and when you press it again it says "touchpad on", and so it is, but now the keyboard has no effect in X, I can type nothing except to meta-ctl F1 to the console. After a reboot the problem persists; and the only way I have found to fix it is to blow away .gconf are replace it with a copy I made in happier times. Deleting/modifying .gconf/desktop/gnome/peripherals/touchpad/%gconf.xml does not fix the problem. There is no way to turn off the switch in BIOS without losing the touchpad. I would prise the thing out with a screwdriver if I could, but it's a work machine. This button is the bane of my life, hanging over me like a sword of Damocles.

    Read the article

  • minecraft wont take keyboard input

    - by Drew S
    After upgrading to 13.10 FTB(minecraft) wont take keyboard input after login in. I can click the buttons but it will not let me type in a address on multiplayer, or copy/paste with mouse. Since upgrading I cannot run the other mod packs either, only the one I had installed from 13.04. I get this when running a new modpack: 2013-10-28 15:14:52 [INFO] [STDERR] Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError 2013-10-28 15:14:52 [INFO] [STDERR] at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:355) 2013-10-28 15:14:52 [INFO] [STDERR] at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56) 2013-10-28 15:14:52 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:733) 2013-10-28 15:14:52 [INFO] [STDERR] at java.lang.Thread.run(Thread.java:724) 2013-10-28 15:14:52 [INFO] [STDERR] Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 2013-10-28 15:14:52 [INFO] [STDERR] at org.lwjgl.opengl.XRandR$Screen.<init>(XRandR.java:234) 2013-10-28 15:14:52 [INFO] [STDERR] at org.lwjgl.opengl.XRandR$Screen.<init>(XRandR.java:196) 2013-10-28 15:14:52 [INFO] [STDERR] at org.lwjgl.opengl.XRandR.populate(XRandR.java:87) 2013-10-28 15:14:52 [INFO] [STDERR] at org.lwjgl.opengl.XRandR.access$100(XRandR.java:52) 2013-10-28 15:14:52 [INFO] [STDERR] at org.lwjgl.opengl.XRandR$1.run(XRandR.java:110) 2013-10-28 15:14:52 [INFO] [STDERR] at java.security.AccessController.doPrivileged(Native Method) 2013-10-28 15:14:52 [INFO] [STDERR] at org.lwjgl.opengl.XRandR.getConfiguration(XRandR.java:108) 2013-10-28 15:14:52 [INFO] [STDERR] at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:618) 2013-10-28 15:14:52 [INFO] [STDERR] at org.lwjgl.opengl.Display.<clinit>(Display.java:135) 2013-10-28 15:14:52 [INFO] [STDERR] ... 4 more

    Read the article

  • Java applet game design no keyboard focus

    - by Sri Harsha Chilakapati
    THIS IS PROBABLY THE WRONG PLACE. POSTED ITHERE (STACKOVERFLOW) I'm making an applet game and it is rendering, the game loop is running, the animations are updating, but the keyboard input is not working. Here's an SSCCE. public class Game extends JApplet implements Runnable { public void init(){ // Initialize the game when called by browser setFocusable(true); requestFocus(); requestFocusInWindow(); // Always returning false GInput.install(this); // Install the input manager for this class new Thread(this).start(); } public void run(){ startGameLoop(); } } And Here's the GInput class. public class GInput implements KeyListener { public static void install(Component c){ new GInput(c); } public GInput(Component c){ c.addKeyListener(this); } public void keyPressed(KeyEvent e){ System.out.println("A key has been pressed"); } ...... } This is my GInput class. When run as an applet, it doesn't work and when I add the Game class to a frame, it works properly. Thanks

    Read the article

  • Two Hidden NetBeans Keyboard Shortcuts for Opening & Toggling between Views

    - by Geertjan
    The following are two really basic shortcuts for working with NetBeans editor windows that will be added to the Keyboard Shortcuts card for NetBeans IDE 7.2: Ctrl-Alt-PgUp/PgDown: Shortcuts for switching between editor types (e.g. Source, Design, History buttons). Switching between the editor types is a frequent operation sometimes, e.g., when using GUI builder, and while it can be done easily via mouse, or from View | Editors menu, it is very handy to know the shortcuts as well. Ctrl-PgUp/PgDown: Similarly, these are shortcuts for switching to next/previous opened document (tab). Note this is not like Ctrl-Tab that cycles in the last used order, but going through the tabs as they appear in the editor. Both shortcuts should fit into the "Opening and Toggling between Views" section. These are important to mention on the card because they are not visible anywhere else in the UI (as there are no menu items like "Go to next/previous editor type" or "Go to next/previous document"). Reported by Tomas Pavek from the NetBeans Team, here: http://netbeans.org/bugzilla/show_bug.cgi?id=213815

    Read the article

  • Can I set up two computers up with the same monitors/keyboard/mouse in a modular way?

    - by CodeJunkie
    I have a desktop computer computer (running Windows 7), and a laptop (running OSX Mountain Lion, and maybe Ubuntu 12 eventually). When the laptop is at home, I want both the desktop and the laptop to use the same (2+) monitors, the keyboard, and the mouse (or mice, if I add a track pad). I know about KVM switches, but I want something more complicated. I like to use Synergy to use both computers with one keyboard and mouse at the same time. Synergy requires that the keyboard and mouse be connected to one computer (the server), which shares them with other computers (clients) over wifi. the issue is that when one computer isn't logged in, Synergy doesn't work on it. Sometimes, I want my laptop to be the server (physically connected to the keyboard and mouse), and sometimes I want my desktop to be the server. This means that I need the keyboard/mouse/other USB devices to be able to switch computers without me playing musical plugs. To complicate things further, I don't always want the same desktop set up in terms of monitors. Sometimes, I want the desktop to have both monitors. Other times, I want the laptop to control both monitors. Sometimes I want the desktop to control one monitor, and the laptop to control the other. In any case, the keyboard and mouse need to be able to be physically connected to either computer without lots of fussing with plugs. This breaks down to at least this set of possible combinations: Desktop controls both monitors, and has a physical connection to keyboard and mouse Laptop controls both monitors, and has a physical connection to keyboard and mouse Desktop and laptop each control a monitor, but the desktop has a physical connection to the keyboard and mouse (which it shares with the laptop via wifi) Desktop and laptop each control a monitor, but the laptop has a physical connection to the keyboard an mouse (which it shares with the desktop via wifi) some usb devices connected via a usb hub need to be able to switch physical connection between computers, ideally without the keyboard and mouse switching computer connection There may be other combinations, but these are the main ones at the moment. Basically, I need a KVM switch which allows me to switch individual monitors/keyboard/mouse/usb hub between computers independently of each other, or a better solution. How can I set two computers up with the same monitors/mice/keyboard/usb hub without having to switch everything to one computer or the other all at the same time?

    Read the article

  • Backtick (Grave accent) button sticking

    - by Scott Lemmon
    I have Ubuntu 12.04 running in a Virtual Box virtual machine, on my Windows 7 32bit system. It has been working great, except that the backtick/tilde button sticks(not physically). When I hit the backtick button it keeps repeating until another input button is pressed. So if I press the spacebar while the backtick is repeating, it stops, but if I press the shift while it is repeating, the backtick turns into a tilde, and the tilde keeps repeating until I release the shift key (at which point it's a backtick again and keeps repeating). This sticking behavior only happens with the backtick key, and only in my Ubuntu virtualization, never in windows. I've tried both my laptop's keyboard and an external USB keyboard and the problem happens on both. Both keyboards I've tried are Japanese 106/109 key layout, but I'm using them with a English(US) 101 profile. When I refer to the backtick key above, I mean where it is on the US layout. If I use the Japanese profile, the key in that location (the US backtick location) still sticks, but its no longer mapped as the backtick key. Any thoughts as to what might be causing this and possible solutions? I've searched a lot, but have not found any help so far. Any help is greatly appreciated.

    Read the article

  • How to change CapsLock key to produce "a"?

    - by Pit
    While typing I often hit the CapsLock key instead of the a key. (QWERTZU keyboard) This is quite annoying because the moment I realise that I hit the wrong key, I will have to delete multiple character/lines of text an rewrite them in the right form. I am searching for a way to prevent this. I have found a possibility to disable the CapsLock key in Keyboard Layout Options. But this would in my case mean that instead of writing an a I would write nothing. Positive - I don't have to rewrite a whole line, but only one character Negative - It's not that obvious that I hit the wrong key, as a missing character is not perceivable as an upper-case line of text. I would therefore prefer a possibility to map CapsLock to a . Thus when hitting CapsLock an a character would be written. Positive - If I hit CapsLock instead of a I get the output I actually wanted to type. Negative - If I hit CapsLock in any other context I will get an a character. As I don't ever intentionally use the CapsLock key this would not really pose a problem. (I think, or does it?) My Question: So how do I change to a ? And is there any case where this could be dangerous/provoke unwanted behaviour?

    Read the article

  • Fn key sticks down

    - by Oli
    Just bought my significant other a shiny new Samsung Q330 13" netbook, stuck an OCZ Agility in it and installed Maverick. Just as a quick aside, this is a devastating combination. Graphics work perfectly and it cold-boots to desktop in about 7 seconds. Very quick. But (common to laptops) I've got a couple of problems. I'll start with the most problematic and start a new thread for the other. Like a lot of laptops, there is a Fn (function) modifier to allow some keys to have another purpose. When I tried to alter the brightness of the screen by tapping Fn+Down, it worked but kept on going until it was as dim as it could go. I tapped Fn+Up and it went to the other extreme. After that the entire keyboard ceases to work properly because the Fn modifier appears to be locked. Additionally, and as a direct side effect, I think, clicking on things doesn't result in a standard result. It's as if control is being held. A reboot is the only thing that seems to fix these problems. This isn't a problem if you don't touch the Fn key but as there are two of them on the keyboard, an accident is going to happen sooner than later, requiring a reboot (and probably some data loss). I don't have a lot of experience with laptops (I prefer my hulking great desktop) so this isn't my area of expertise. I'm open to all suggestions, even disabling the two Fn keys until we can find a better solution.

    Read the article

  • If statement causing xna sprites to draw frame by frame

    - by user1489599
    I’m a bit new to XNA but I wanted to write a simple program that would fire a cannon ball from a cannon at a 45 degree angle. It works fine outside of my keyboard i/o if statement, but when I encapsulate the code around an if statement checking to see if the user hits the space bar, the sprite will draw one frame at a time every time the space bar is hit. This is the code in question if (currentKeyboardState.IsKeyUp(Keys.Space) && previousKeyboardState.IsKeyDown(Keys.Space) && !skullBall.Alive) { //works outside the keyboard input if statement //{ skullBall.Position = cannon.Position; skullBall.DeltaY = -(float)(Math.Sin(MathHelper.ToRadians(45)) * 50/*39.7577*/ * time + 0.5 * (gravity * (time * time))); skullBall.DeltaX = (float)(Math.Cos(MathHelper.ToRadians(45)) * 50/*39.7577*/ * time); skullBall.Alive = true; //} } The skull ball represents the cannon ball and the cannon is just the starting point. DeltaX and DeltaY are the values I’m using to update the cannon balls position per update. I know it's dumb to have the cannon ball start at the cannons position every time the update is called but it’s not really noticeable right now. I was wondering if after examining my code, if anyone noticed any errors that would cause the sprite to display frame by frame instead of drawing it as a full animation of the cannon ball leaving the cannon and moving from there.

    Read the article

  • XNA: How to make the Vaus Spacecraft move left and right on directional keys pressed?

    - by Will Marcouiller
    I'm currently learning XNA per suggestion from this question's accepted answer: Where to start writing games, any tutorials or the like? I have then installed everything to get ready to work with XNA Game Studio 4.0. General Objective Writing an Arkanoid-like game. I want to make my ship move when I press either left or right keys. Code Sample protected override void Update(GameTime gameTime) { // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit(); // TODO: Add your update logic here #if WINDOWS if (Keyboard.GetState().IsKeyDown(Keys.Escape)) this.Exit(); else { if (Keyboard.GetState().IsKeyDown(Keys.Left)) MoveLeft(gameTime); } #endif // Move the sprite around. BounceEnergyBall(gameTime); base.Update(gameTime); } void MoveLeft(GameTime gameTime) { // I'm not sure how to play with the Vector2 object and its position here!... _vausSpacecraftPos /= _vausSpacecraftSpeed.X; // This line makes the spacecraft move diagnol-top-left. } Question What formula shall I use, or what algorithm shall I consider to make my spaceship move as expected left and right properly? Thanks for your thoughts! Any clue will be appreciated. I am on my learning curve though I have years of development behind me (already)!

    Read the article

  • Control convention for circular movement?

    - by Christian
    I'm currently doing a kind of training project in Unity (still a beginner). It's supposed to be somewhat like Breakout, but instead of just going left and right I want the paddle to circle around the center point. This is all fine and dandy, but the problem I have is: how do you control this with a keyboard or gamepad? For touch and mouse control I could work around the problem by letting the paddle follow the cursor/finger, but with the other control methods I'm a bit stumped. With a keyboard for example, I could either make it so that the Left arrow always moves the paddle clockwise (it starts at the bottom of the circle), or I could link it to the actual direction - meaning that if the paddle is at the bottom, it goes left and up along the circle or, if it's in the upper hemisphere, it moves left and down, both times toward the outer left point of the circle. Both feel kind of weird. With the first one, it can be counter intuitive to press Left to move the paddle right when it's in the upper area, while in the second method you'd need to constantly switch buttons to keep moving. So, long story short: is there any kind of existing standard, convention or accepted example for this type of movement and the corresponding controls? I didn't really know what to google for (control conventions for circular movement was one of the searches I tried, but it didn't give me much), and I also didn't really find anything about this on here. If there is a Question that I simply didn't see, please excuse the duplicate.

    Read the article

  • SQL SERVER – SSMS 2012 Reset Keyboard Shortcuts to Default

    - by pinaldave
    As a technologist, I love my laptop very much and I do not lend it to anyone as I am usually worried that my settings would be messed up when I get it back from its borrower. Honestly, I love how I have set up my laptop and I enjoy the settings and programs I have placed on my computer. If someone changes things there – it will surely be annoying for me. Recently at one of the conferences I was attending in, a small accident happened – one of the speaker’s hard drives failed. The owner immediately panicked due to this and had no clue what to do. I suggested that he may not be able to show the demos but can still show a few things with the product. He accepted my suggestion and finished the presentation. Good thing everybody looked satisfied. Little did I know that a small accident was waiting for me later that day. When I opened my SQL Server Denali, all my shortcuts were totally out of order. When I hit F5, instead of executing query, it was opening up some debugging screen for me. I was very much annoyed so I decided to surf the Internet for me to know how I could reset it to SQL Server 2012 default shortcut. There were so many different advices which further confused me. After reading 4-5 different methods, I used the following method to reset my SQL Server 2012 keyboard shortcuts: Go to SSMS > Tools >> Import and Export Settings… As I wanted to reset all the settings I selected the “Reset all settings” option, but you can select other options as per your need. I suggest you save your current Settings; however, in my case, I did not like the current option so I just decided to overwrite my settings. Here I have two options –  I can either set my shortcut to SQL Server 2012 settings or Visual Studio 2010. I went ahead with the SQL Server 2012 option. Success! Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Numeric keyboard dismiss???

    - by shishir.bobby
    HI all, I am having a 2 textFeild and 1 textview. out of 2 textfeild,one textfield requires number to be filled in there. so for that i hv provided numeric keyboard. i m not able to dismiss numeric keyboard,since i cant c any option to hit the numeric keyboard dismiss. is it possible to dismiss numeric keyboard ?? if yes than can anyone guide me through. regards shishir

    Read the article

  • Why Virtual keyboard does not trigger AutocompleteList?

    - by ali.msgh
    Hi, I have to use a Virtual(on screen) keyboard on a asp:textbox which has a AjaxControlToolkit's automcomplete attached to it, the virtual keyboard I use is the jQuery keypad plug in: http://keith-wood.name/keypadRef.html , but I have some problems with combining these two: Typing in the virtual keyboard does not trigger the Autocomplete list. When the textbox has autopostback=true if you click anything on virtual keyboard the textbox loses its focus and posts the form.

    Read the article

  • How can I dismiss keyboard in iPhone OS 3.2 with text field in popover?

    - by Tom H
    I have several text fields in a custom uiviewcontroller subclass, which is displayed within a popover. The popover is displayed form a bar button. I want the keyboard to go down when the popover is dismissed (either by the user tapping the bar button again, or tapping outside the popover. From the view controller that displays the popover, when the popover is dismissed, in either of the 2 fashions, I call [optionsController dismissFirstResponder]; Optionscontroller is the uiviewcontroller subclass in the popover. Dismissfirstresponder is a method I defined: -(void)dsimissFirstResponder { [nameField resignFirstResponder]; [descriptionField resignFirstResponder]; [helpField resignFirstResponder]; } Those are three IBoutlets which I connected in the xib to the text fields. That doesn't work. Any help with this would be greatly appreciated.

    Read the article

  • USB interface barcode scanners

    - by Nimbuz
    Not exactly a programming question, but close. I'll try my luck anyway. The keyboard wedge barcode scanner inserts the translation device between the reader and the keyboard. Data sent through a wedge appears as if it was typed into the computer, while the keyboard itself remains fully functional. Because a computer using a keyboard wedge can't tell the difference between data that is entered by a scanning device, or data that is entered by keyboard typing, a wedge can be used to easily add barcode reading capability to an existing computer without modifying software applications. I'd like to know if all USB interface barcode scanners automatically translate digital signals from a barcode reader into keyboard strokes for a applications just like wedge or is USB different from wedge? Many thanks

    Read the article

  • Lenovo Mini Wireless Keyboard N5901: Remap orange "My Computer" button

    - by Jon Schneider
    I have a Lenovo Mini Wireless Keyboard N5901 (a.k.a. Part No. 57Y6336) that I'm using with an HTPC running Windows 7. The remote comes with an orange button in the top-left corner that by default, when pressed, opens the Windows "My Computer" window. I would like to remap / reprogram this button to act like the green "Windows Media Center" button instead on a Windows Media Center (WMC) remote; that is, open Windows Media Center if it isn't already open, or go to the WMC homepage if WMC is already open. I've tried several keyboard-remapping utilities (as recommended in other, more general "how to remap keyboard key?" SuperUser.com questions) including SharpKeys, Key Mapper, and KeyTweak, with no luck so far. None of these utilities recognize the orange button -- they all do recognize that some key was pressed, but display a value for the key of "unsupported" or something similar. I was able to use a utility called Keyboard Scan Code Generator to determine that a press of the orange button has a KeyData value of 16777217 (0x1000001), and a "Virtual Code" value of 182. (The other "media" buttons on the N5901 have the same KeyData value, but different Virtual Code values). I'm not sure at this point where in Windows this keystroke is being interpreted as a command to open "My Computer." There is no special software / driver for this device; it worked out of the box with Windows 7, no special driver install necessary. Is there any way to accomplish this? Thanks in advance for any suggestions!

    Read the article

  • What can cause Windows to unhook a low level (global) keyboard hook?

    - by Davy8
    We have some global keyboard hooks installed via SetWindowsHookEx with WH_KEYBOARD_LL that appear to randomly get unhooked by Windows. We verified that they hook was no longer attached because calling UnhookWindowsHookEx on the handle returns false. (Also verified that it returns true when it was working properly) There doesn't seem to be a consistent repro, I've heard that they can get unhooked due to timeouts or exceptions getting thrown, but I've tried both just letting it sit on a breakpoint in the handling method for over a minute, as well as just throwing a random exception (C#) and it still appears to work. In our callback we quickly post to another thread, so that probably isn't the issue. I've read about solutions in Windows 7 for setting the timeout higher in the registry because Windows 7 is more aggressive about the timeouts apparently (we're all running Win7 here, so not sure if this occurs on other OS's) , but that doesn't seem like an ideal solution. I've considered just having a background thread running to refresh the hook every once in a while, which is hackish, but I don't know of any real negative consequences of doing that, and it seems better than changing a global Windows registry setting. Any other suggestions or solutions? The delegates are not being GC'd since they're static members, which is one cause that I've read about.

    Read the article

  • How do I enable Scroll Lock?

    - by Anton Ciprian Vasilache
    I need to enable scroll lock so I can toggle lights on my keyboard. This works on Arch.Funny thing it doesn't work on Ubuntu. http://linuxtechie.wordpress.com/2008/04/07/getting-scroll-lock-to-work-in-ubuntu/ $ xmodmap -e ‘add mod3 = Scroll_Lock’ xmodmap: unknown command on line commandline:1 xmodmap: unable to open file 'mod3' for reading xmodmap: unable to open file '=' for reading xmodmap: unable to open file 'Scroll_Lock’' for reading xmodmap: 4 errors encountered, aborting.

    Read the article

  • Keypress detection wont work after seemingly unrelated code change

    - by LukeZaz
    I'm trying to have the Enter key cause a new 'map' to generate for my game, but for whatever reason after implementing full-screen in it the input check won't work anymore. I tried removing the new code and only pressing one key at a time, but it still won't work. Here's the check code and the method it uses, along with the newMap method: public class Game1 : Microsoft.Xna.Framework.Game { // ... protected override void Update(GameTime gameTime) { // ... // Check if Enter was pressed - if so, generate a new map if (CheckInput(Keys.Enter, 1)) { blocks = newMap(map, blocks, console); } // ... } // Method: Checks if a key is/was pressed public bool CheckInput(Keys key, int checkType) { // Get current keyboard state KeyboardState newState = Keyboard.GetState(); bool retType = false; // Return type if (checkType == 0) { // Check Type: Is key currently down? if (newState.IsKeyDown(key)) { retType = true; } else { retType = false; } } else if (checkType == 1) { // Check Type: Was the key pressed? if (newState.IsKeyDown(key)) { if (!oldState.IsKeyDown(key)) { // Key was just pressed retType = true; } else { // Key was already pressed, return false retType = false; } } } // Save keyboard state oldState = newState; // Return result if (retType == true) { return true; } else { return false; } } // Method: Generate a new map public List<Block> newMap(Map map, List<Block> blockList, Console console) { // Create new map block coordinates List<Vector2> positions = new List<Vector2>(); positions = map.generateMap(console); // Clear list and reallocate memory previously used up by it blockList.Clear(); blockList.TrimExcess(); // Add new blocks to the list using positions created by generateMap() foreach (Vector2 pos in positions) { blockList.Add(new Block() { Position = pos, Texture = dirtTex }); } // Return modified list return blockList; } // ... } and the generateMap code: // Generate a list of Vector2 positions for blocks public List<Vector2> generateMap(Console console, int method = 0) { ScreenTileWidth = gDevice.Viewport.Width / 16; ScreenTileHeight = gDevice.Viewport.Height / 16; maxHeight = gDevice.Viewport.Height; List<Vector2> blockLocations = new List<Vector2>(); if (useScreenSize == true) { Width = ScreenTileWidth; Height = ScreenTileHeight; } else { maxHeight = Height; } int startHeight = -500; // For debugging purposes, the startHeight is set to an // hopefully-unreachable value - if it returns this, something is wrong // Methods of land generation /// <summary> /// Third version land generation /// Generates a base land height as the second version does /// but also generates a 'max change' value which determines how much /// the land can raise or lower by which it now does by a random amount /// during generation /// </summary> if (method == 0) { // Get the land height startHeight = rnd.Next(1, maxHeight); int maxChange = rnd.Next(1, 5); // Amount ground will raise/lower by int curHeight = startHeight; for (int w = 0; w < Width; w++) { // Run a chance to lower/raise ground level int changeBy = rnd.Next(1, maxChange); int doChange = rnd.Next(0, 3); if (doChange == 1 && !(curHeight <= (1 + maxChange))) { curHeight = curHeight - changeBy; } else if (doChange == 2 && !(curHeight >= (29 - maxChange))) { curHeight = curHeight + changeBy; } for (int h = curHeight; h < Height; h++) { // Location variables float x = w * 16; float y = h * 16; blockLocations.Add(new Vector2(x, y)); } } console.newMsg("[INFO] Cur, height change maximum: " + maxChange.ToString()); } /// <summary> /// Second version land generator /// Generates a solid mass of land starting at a random height /// derived from either screen height or provided height value /// </summary> else if (method == 1) { // Get the land height startHeight = rnd.Next(0, 30); for (int w = 0; w < Width; w++) { for (int h = startHeight; h < ScreenTileHeight; h++) { // Location variables float x = w * 16; float y = h * 16; // Add a tile at set location blockLocations.Add(new Vector2(x, y)); } } } /// <summary> /// First version land generator /// Generates land completely randomly either across screen or /// in a box set by Width and Height values /// </summary> else { // For each tile in the map... for (int w = 0; w < Width; w++) { for (int h = 0; h < Height; h++) { // Location variables float x = w * 16; float y = h * 16; // ...decide whether or not to place a tile... if (rnd.Next(0, 2) == 1) { // ...and if so, add a tile at that location. blockLocations.Add(new Vector2(x, y)); } } } } console.newMsg("[INFO] Cur, base height: " + startHeight.ToString()); return blockLocations; } I never touched any of the above code for this when it broke - changing keys won't seem to fix it. Despite this, I have camera movement set inside another Game1 method that uses WASD and works perfectly. All I did was add a few lines of code here: private int BackBufferWidth = 1280; // Added these variables private int BackBufferHeight = 800; public Game1() { graphics = new GraphicsDeviceManager(this); graphics.PreferredBackBufferWidth = BackBufferWidth; // and this graphics.PreferredBackBufferHeight = BackBufferHeight; // this Content.RootDirectory = "Content"; this.graphics.IsFullScreen = true; // and this } When I try adding a console line to be printed in the event the key is pressed, it seems that the If is never even triggered despite the correct key being pressed.

    Read the article

  • Ubuntu 14.04 key arrow up is being pressed by itself

    - by Margo Nikolopoulou
    Keyboard's up arrow key is keep pressing itself every few seconds. I tried to install Ubuntu 14.04 via boot cd, even before installation the arrow key was being pressed by itself. I tried to use Ubuntu first without installing it and then tried to install it from there, the issue seemed to be fixed. I was using the PC for months until out of the blue the issue came back. IT IS NOT A HARDWARE ISSUE! Thank you in advance.

    Read the article

  • How to type all the math, stat, greek, equations EFFICIENTLY in libreoffice?

    - by kernel_panic
    i am preparing a report related to physics which is full of greek, stat and calculus things, i know there is this question how to insert a greek symbol, but my problem is i cant fiddle with a drop down/ scroll list for for every symbol(my paper in FULL of those), is there a way to do something with my keyboard layout, and turn it into something like the one Tony Stark uses in Ironman(i am not kidding please). i am literally tired for this fiddle-work for half of the day and have completed just 2 sheets, hmmm.

    Read the article

  • How to change the binding of Windows key which runs Unity's Dash?

    - by LFC_fan
    Currently, I am using the Unity Qt panel in my Gnome desktop, and when I press the Windows key, the Unity's dash launches, and I can't use any compiz based shortcuts. Same behaviour is exhibited when I log in to Unity 2D as well, as the Windows key launches the dash. I have no desire to change my Compiz shortcuts, so is there any way to change the keyboard mapping of Unity 2D's dash to something other or disable this shortcut completely?

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >