Catalyzes the ADP-dependent phosphorylation of D-glucose to D-glucose 6-phosphate and glucosamine to glucosamine 6-phosphate (PubMed:11098152, PubMed:23818958). Can also use CDP as the phosphoryl group donor and D-1,5-anhydroglucitol as the phosphoryl group acceptor (PubMed:11098152). ADP + D-glucose = AMP + D-glucose 6-phosphate + H(+) ADP + D-glucosamine = AMP + D-glucosamine 6-phosphate + H(+) Binds 1 Mg(2+) ion per subunit. Optimum pH is about 7.5. Optimum temperature may be above 100 degrees Celsius. Activity observed at 100 degrees Celsius is about 8 times that at 37 degrees Celsius. Thermostable up to 95 degrees Celsius. Retains full activity after heating at 90 degrees Celsius for 10 min and more than 95% of the full activity at 100 degrees Celsius for 10 min. Carbohydrate degradation; glycolysis. Monomer. Belongs to the ADP-dependent glucokinase family.