Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Language file for Norwegian keyboard layout #46

Conversation

erikbra
Copy link

@erikbra erikbra commented Mar 4, 2016

No description provided.

'vk_oem_period' : '.',

'shift+vk_oem_minus' : '?',
'shift+vk_oem_plus' : '+',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be ` ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which one do you mean?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are correct. But, that one's also a dead key. Have commented it out, and commented that it's a dead key.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

@aioutecism
Copy link
Owner

Ref
keyboard_layout_norwegian

@@ -0,0 +1,43 @@
import {LayoutMap} from './Layout';

export const id = 'NO QWERTY';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make the id easier to understand by using Norwegian QWERTY, and rename the file to Norwegian_QWERTY.ts?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weeelll.. NO is the ISO3166 two-letter country code for Norway, so it is actually a sensible choice. The problem is that it's also the word 'NO'. Say you get an Azerbaijanian layout, Would you call it 'AZ' or Azerbaijanian? Maybe we should make one more example, just to clarify that this is actually the country code, and not "Not a QWERTY keyboard mapping"?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with ISO3166 code ;)
This is great. I think a comment above the export const id line would be clear enough for contributors.

# ISO3166 country code: https://www.iso.org/obp/ui/#search/code/
export const id = 'NO QWERTY';

@aioutecism
Copy link
Owner

Cloud you add this layout option to README.md?

@erikbra
Copy link
Author

erikbra commented Mar 4, 2016

BTW, I couldn't get testing the layout to work. I opened VSCode, but then you said to "Open the root folder" and press F5. Where do I 'install' the plugin from source?

@aioutecism
Copy link
Owner

For testing, you should

  1. Open your command line application (PowerLine or any of your favorites).
  2. cd path/to/your/git/clone.
  3. Run npm install (You must have nodejs installed).
  4. Open VSCode.
  5. "File / Open.." and open path/to/your/git/clone.
  6. Press F5. VSCode should build the current opened project and run it for you.

Let me know where you stuck in.

@aioutecism
Copy link
Owner

You may find this helpful.

@erikbra
Copy link
Author

erikbra commented Mar 4, 2016

Sorry, I forgot to "Open folder", so I couldn't open it. Now I managed, but it basically just lets me enter ONE character in the new dev-vscode window that shows up, no matter which keyboard layout I use.

@aioutecism
Copy link
Owner

I tried your branch, and realized I forgot some code you need to add:

diff --git a/src/Layouts/Layout.ts b/src/Layouts/Layout.ts
index 8b10e4f..7d22031 100644
--- a/src/Layouts/Layout.ts
+++ b/src/Layouts/Layout.ts
@@ -1,4 +1,5 @@
 import * as US_QWERTY from './US_QWERTY';
+import * as NO_QWERTY from './NO_QWERTY';

 export interface LayoutMap {
     [key: string]: string;
@@ -52,3 +53,4 @@ export class Layout {
 }

 Layout.register(US_QWERTY.id, US_QWERTY.map);
+Layout.register(NO_QWERTY.id, NO_QWERTY.map);

This means loading NO_QWERTY file and add the layout included in it.

@erikbra
Copy link
Author

erikbra commented Mar 7, 2016

I just don't get it. I cannot enter more than ONE character after entering insert mode. Then nothing happens. Even with US keyboard layout (same with Norwegian). Don't think not mapping the dead keys work either. Get error on load when I add your edits, and have commented out the dead keys.

@magbeat
Copy link
Contributor

magbeat commented Mar 9, 2016

@aioutecism I have the same problem as @erikbra. I have added Swiss German layout in #48

@aioutecism
Copy link
Owner

@erikbra
I'm not sure what your problem is.
Would you mind I merge this p-r and publish a new version for you to test?

@aioutecism
Copy link
Owner

@magbeat
Thanks! I'll check it now.

@aioutecism
Copy link
Owner

Hi @erikbra

I merged the keyboard layout main branch into master.
Cloud you solve the conflicts and push again?

@aioutecism
Copy link
Owner

Since microsoft/vscode#1432 is addressed.
All layouts should work fine after we update the extension to use the new APIs VSCode provides.
I'm closing this p-r.

If you'd like to track status of obtaining new APIs, please subscribe to this.

@aioutecism aioutecism closed this Mar 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants