I can see for example how to send KC_CIRCUMFLEX, but for example KC_G sends both g and G .... or is it actually sending the scancode from an ANSI keyboard for G? ie <AC05> = 43 (lifted from //usr/share/X11/xkb/keycode/ibm scancodes file) or somesuch?
Like I said, I was expecting QMK to specify that the key in row 3 column 6 sends AC05, and then in /usr/share/X11/xkb/symbols/us
I would have something like key <AC05> { [ g, G, copyright, dead_doubleacute ] }; But I suppose XKB is only set up for Shift, AltGr and ShiftAltGr, and QMK allows for other fancy tricks.
So when I define the layers, if I want a separate Shift layer, will it effectively be a duplicate in most cases? eg if g and G happen to be on the same key, then we say that base layer and shift layer both send KC_G ?
Each layer defines a single keycode for each key position. So, if you define a key location with "KC_G", if pressed, it will output lower case "g". If you define a modifier key on that layer (it can inherit this keycode from the calling layer so you don't have to define positional modifiers that you want to exist across layers), say "KC_LSFT", if held down, will cause "KC_G" to output upper case "G".
You can define a key with a macro keycode, such as "S(KC_G)", which if pressed, will output upper case "G" so you don't need to hold down a modifier -- you can even define chained modifier keycodes, e.g. "LCTL(S(KC_G))". And you can define chained modifiers that, when held down (or tapped, one shot, etc.), operate on all the defined keycodes of that layer. You can create complex and convenient key values this way.
So a layer defines a default keycode for the key position, and any modifier alters the ANSI output value.
Now, you also have the ability within QMK to trap the keystroke stream and do what you want to with any of your defined keycodes -- extend QMK macro functionality, manage layers beyond what QMK has macros for, write a calculator, etc. The latter would be over the top but you get the picture. I have extended and added a lot of layer functionality to suit my own workflow. But the QMK library probably fills the needs way beyond what most people would use with its extensive set of key actions, such as one shot modifiers/layers, toggle keys/layers, tap dance, etc.
So, in your above example, you probably need 3 layers: "g" on one with a modifier to produce "G", and separate layers to produce the special characters (unless a modifier would suffice on one of the 2 symbols -- though, I would imagine using two or more layers would make for a much more flexible organization of symbols).
Hope this helps.